Summary: Interpreter for the classic dialect of the programming language BASIC. Name: bas Version: 2.3 Release: 1 License: GNU GPL Group: Development/Languages/BASIC Source0: http://www.moria.de/~michael/bas/%{name}-%{version}.tar.gz Patch0: %{name}-%{version}-aix.patch URL: http://www.moria.de/~michael/bas BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: flex BuildRequires: gettext Requires: gettext %description Bas is an interpreter for the classic dialect of the programming language BASIC. It is pretty compatible to typical BASIC interpreters of the 1980s, unlike some other UNIX BASIC interpreters, that implement a different syntax, breaking compatibility to existing programs. Bas offers many ANSI BASIC statements for structured programming, such as procedures, local variables and various loop types. Further there are matrix operations, automatic LIST indentation and many statements and functions found in specific classic dialects. Line numbers are not required. The interpreter tokenises the source and resolves references to variables and jump targets before running the program. This compilation pass increases efficiency and catches syntax errors, type errors and references to variables that are never initialised. Bas is written in ANSI C for UNIX systems. %prep %setup -q %patch0 %build export CC="cc -qcpluscmt -D_LARGE_FILES" export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} make %{?_smp_mflags} # create AIX shared library CreateExportList libbas.exp libbas.a ${CC} -qmkshrobj libbas.a -o shr.o -bE:libbas.exp -bernotok -L/opt/freeware/lib -lintl -lcurses -lm rm -f libbas.exp libbas.a /usr/bin/ar -rv libbas.a shr.o # relink bas against shared library rm -f %{name} ${CC} -qlanglvl=extc89 -o %{name} -L/opt/freeware/lib main.o getopt.o getopt1.o -L. -lbas ${LDFLAGS} -lintl -lcurses -lm %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make install prefix=${RPM_BUILD_ROOT}%{_prefix} /usr/bin/strip -X32_64 ${RPM_BUILD_ROOT}%{_bindir}/* || : mv ${RPM_BUILD_ROOT}%{_datadir}/man ${RPM_BUILD_ROOT}%{_prefix} ( cd ${RPM_BUILD_ROOT} for dir in bin lib do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc README %{_bindir}/* %{_libdir}/*.a %{_mandir}/man1/* %{_datadir}/locale/*/*/* /usr/bin/* /usr/lib/*.a %changelog * Tue Mar 26 2013 Michael Perzl - 2.9.15-1 - first version for AIX V5.1 and higher