diff --git a/dev-lang/algol68g/algol68g-2.8.4.recipe b/dev-lang/algol68g/algol68g-2.8.4.recipe new file mode 100644 index 000000000..8124af4e3 --- /dev/null +++ b/dev-lang/algol68g/algol68g-2.8.4.recipe @@ -0,0 +1,73 @@ +SUMMARY="Algol 68 compiler and interpreter" +DESCRIPTION="Algol68G is an implementation of Algol 68 as defined by the \ +Revised Report. It ranks among the most complete implementations of the \ +language." +HOMEPAGE="https://jmvdveer.home.xs4all.nl/en.algol-68-genie.html" +COPYRIGHT="2001-2016 J. Marcel van der Veer" +LICENSE="GNU LGPL v3" +REVISION="1" +SOURCE_URI="https://jmvdveer.home.xs4all.nl/algol68g-$portVersion.tar.gz" +CHECKSUM_SHA256="5823ccd0c18fe10a368a117cc3924748c4a5d0fe8dff0d9d818ff73c342565f0" +PATCHES="algol68g-$portVersion.patchset" + +ARCHITECTURES="!x86_gcc2 x86 x86_64" +SECONDARY_ARCHITECTURES="x86" + +commandSuffix=$secondaryArchSuffix +commandBinDir=$binDir +if [ "$targetArchitecture" = x86_gcc2 ]; then + commandSuffix= + commandBinDir=$prefix/bin +fi + +PROVIDES=" + algol68g$secondaryArchSuffix = $portVersion + cmd:a68g$commandSuffix + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libgsl$secondaryArchSuffix + lib:libgslcblas$secondaryArchSuffix + lib:libncurses$secondaryArchSuffix + lib:libplot$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libgsl$secondaryArchSuffix + devel:libgslcblas$secondaryArchSuffix + devel:libncurses$secondaryArchSuffix + devel:libplot$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:aclocal + cmd:automake + cmd:autoreconf + cmd:awk + cmd:gcc$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix + " + +defineDebugInfoPackage algol68g$secondaryArchSuffix \ + "$commandBinDir"/a68g + +BUILD() +{ + # TODO: compiler still not enabled + autoreconf -fi + LDFLAGS="-lnetwork" runConfigure --omit-dirs binDir ./configure \ + --bindir="$commandBinDir" \ + --enable-compiler + make $jobArgs +} + +INSTALL() +{ + make install +} + +TEST() +{ + make check +} diff --git a/dev-lang/algol68g/patches/algol68g-2.8.4.patchset b/dev-lang/algol68g/patches/algol68g-2.8.4.patchset new file mode 100644 index 000000000..558541a74 --- /dev/null +++ b/dev-lang/algol68g/patches/algol68g-2.8.4.patchset @@ -0,0 +1,105 @@ +From e7e85ff60df506f485346bd54fbb9a4e61ccd25b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= +Date: Sun, 12 Aug 2018 11:12:30 +0200 +Subject: Add Haiku to the supported OS list + + +diff --git a/configure.ac b/configure.ac +old mode 100755 +new mode 100644 +index efef996..e09be43 +--- a/configure.ac ++++ b/configure.ac +@@ -128,6 +128,14 @@ case "$host" in + AC_MSG_RESULT([freebsd]) + ;; + # ++# HAIKU. ++# ++*86-*-haiku* | *86_64-*-haiku*) ++ AC_DEFINE(HAVE_HAIKU, 1, [Define this if HAIKU was detected]) ++ AC_DEFINE(HAVE_IEEE_754, 1, [Define this if IEEE_754 compliant]) ++ AC_MSG_RESULT([haiku]) ++ ;; ++# + # NetBSD. + # + *86-*-netbsd* | *86_64-*-netbsd*) +diff --git a/source/a68g.c b/source/a68g.c +old mode 100755 +new mode 100644 +index 090fa14..50308e0 +--- a/source/a68g.c ++++ b/source/a68g.c +@@ -899,7 +899,7 @@ Accept various silent extensions. + /* + Compilation on Linux, FreeBSD or NetBSD using gcc + */ +-#if (defined HAVE_LINUX || defined HAVE_FREEBSD || defined HAVE_NETBSD) ++#if (defined HAVE_LINUX || defined HAVE_FREEBSD || defined HAVE_NETBSD || defined HAVE_HAIKU) + #if defined HAVE_TUNING + ASSERT (snprintf (options, SNPRINTF_SIZE, "%s %s %s -g", extra_inc, optimisation, HAVE_TUNING) >= 0); + #else +diff --git a/source/a68g.h b/source/a68g.h +old mode 100755 +new mode 100644 +index 27db0d0..3525bae +--- a/source/a68g.h ++++ b/source/a68g.h +@@ -50,7 +50,7 @@ Top level include file. + #undef HAVE_COMPILER + #elif ((defined HAVE_LINUX || defined HAVE_MAC_OS_X) && defined HAVE_DL) + #define HAVE_COMPILER 1 +-#elif (defined HAVE_FREEBSD || defined HAVE_NETBSD) ++#elif (defined HAVE_FREEBSD || defined HAVE_NETBSD || defined HAVE_HAIKU) + #define HAVE_COMPILER 1 + #else + #undef HAVE_COMPILER +-- +2.16.4 + + +From 903bbec196946af85b1d5b79525c9d5446f434aa Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= +Date: Sun, 12 Aug 2018 11:21:28 +0200 +Subject: Enable dl on Haiku + + +diff --git a/configure.ac b/configure.ac +index e09be43..e73e515 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -676,6 +676,7 @@ if test "x$enable_compiler" = "xyes"; then + fi + if test "x$enable_compiler" = "xyes"; then + AC_CHECK_LIB([dl], [dlopen]) ++ AC_CHECK_LIB([root], [dlopen]) + AC_DEFINE(HAVE_DL, 1, [Define this if a good DL installation was detected]) + fi + fi +-- +2.16.4 + + +From 39df6bd48e8c4e8449609e327d6072e2539a3b4e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= +Date: Sun, 12 Aug 2018 12:07:34 +0200 +Subject: Enable networking + + +diff --git a/source/a68g.h b/source/a68g.h +index 3525bae..fb12892 100644 +--- a/source/a68g.h ++++ b/source/a68g.h +@@ -59,7 +59,7 @@ Top level include file. + /* Can we access the internet? */ + + #if (defined HAVE_NETDB_H && defined HAVE_NETINET_IN_H && defined HAVE_SYS_SOCKET_H) +-#if (defined HAVE_LINUX || defined HAVE_MAC_OS_X || defined HAVE_FREEBSD || defined HAVE_NETBSD) ++#if (defined HAVE_LINUX || defined HAVE_MAC_OS_X || defined HAVE_FREEBSD || defined HAVE_NETBSD || defined HAVE_HAIKU) + #define HAVE_HTTP + #endif + #endif +-- +2.16.4 +