summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--user/free42/APKBUILD41
-rw-r--r--user/free42/free42.desktop9
-rw-r--r--user/free42/libx11.patch11
-rw-r--r--user/free42/patch.patch65
4 files changed, 126 insertions, 0 deletions
diff --git a/user/free42/APKBUILD b/user/free42/APKBUILD
new file mode 100644
index 000000000..126880926
--- /dev/null
+++ b/user/free42/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: A. Wilcox <awilfox@adelielinux.org>
+# Maintainer: A. Wilcox <awilfox@adelielinux.org>
+pkgname=free42
+pkgver=2.0.22
+pkgrel=0
+pkgdesc="Scientific programmable calculator"
+url="http://thomasokken.com/free42/"
+arch="all"
+options="!check" # No test suite.
+license="GPL-2.0-only AND Public-Domain"
+depends=""
+makedepends="alsa-lib-dev gtk+2.0-dev libx11-dev libxmu-dev"
+subpackages=""
+source="http://thomasokken.com/free42/upstream/free42-nologo-$pkgver.tgz
+ free42.desktop
+ libx11.patch
+ patch.patch
+ "
+builddir="$srcdir/free42-nologo-$pkgver/gtk"
+
+build() {
+ cd "$builddir"
+ local SAVE_CFLAGS
+ SAVE_CFLAGS=$CFLAGS
+ unset CFLAGS
+ ./build-intel-lib.sh
+ CFLAGS=$SAVE_CFLAGS
+ make BCD_MATH=1 AUDIO_ALSA=1
+}
+
+package() {
+ cd "$builddir"
+ install -D -m755 free42dec "$pkgdir"/usr/bin/free42dec
+ install -D -m644 "$srcdir"/free42.desktop \
+ "$pkgdir"/usr/share/applications/free42.desktop
+}
+
+sha512sums="865e8cce86a882aba10e7e756308e195a6675f0b6db4b881e7b7df67de95f5169ca801005e25dd0e61a70a5a0cd6a374b0cf58003251cdc9dc526a2506e18e1d free42-nologo-2.0.22.tgz
+3d0dee5b574e171692e341c09d2204a048888e5e34cc479ee4f23f4ac137134db7e9d94779765e0426642e3a3069f9b3d962b72ebcea495c1e0b20d32405640b free42.desktop
+f8434fd1c20f0dd40de5773615eaf798329870231f7ce66785a1bc8e208fa0a64919f48ac3eea5ab9ceb818570ae93f61b0e81baec4261bbdfbf04237108ab6a libx11.patch
+b529bc68cbc84e3e698a16afe4b7a5ad52119125749d75d3392cc9281a3dfae7cba0a9637ac88fc96d6da89564225265b785a33b841708f14d6bf4b8c4be6f5d patch.patch"
diff --git a/user/free42/free42.desktop b/user/free42/free42.desktop
new file mode 100644
index 000000000..704fbe80c
--- /dev/null
+++ b/user/free42/free42.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Type=Application
+Version=1.1
+Name=Free42
+GenericName=Scientific Calculator
+Comment=HP-42S Calculator Simulator
+Icon=accessories-calculator
+Exec=/usr/bin/free42dec
+Category=Utility;Calculator;Science;Math;
diff --git a/user/free42/libx11.patch b/user/free42/libx11.patch
new file mode 100644
index 000000000..54c4c6cc0
--- /dev/null
+++ b/user/free42/libx11.patch
@@ -0,0 +1,11 @@
+--- gtk/Makefile.old 2019-01-13 14:52:39.000000000 +0000
++++ gtk/Makefile 2019-01-17 01:38:40.500000000 +0000
+@@ -35,7 +35,7 @@
+ -D_WCHAR_T_DEFINED
+
+ LDFLAGS = -L/usr/X11R6/lib
+-LIBS = gcc111libbid.a -lXmu $(shell pkg-config --libs gtk+-2.0)
++LIBS = gcc111libbid.a -lXmu $(shell pkg-config --libs gtk+-2.0) -lX11
+
+ ifeq "$(shell uname -s)" "Linux"
+ LDFLAGS += -Wl,--hash-style=both
diff --git a/user/free42/patch.patch b/user/free42/patch.patch
new file mode 100644
index 000000000..03e73a5f3
--- /dev/null
+++ b/user/free42/patch.patch
@@ -0,0 +1,65 @@
+--- gtk/intel-lib-linux.patch.old 2019-01-13 14:52:39.000000000 +0000
++++ gtk/intel-lib-linux.patch 2019-01-17 01:27:01.470000000 +0000
+@@ -1668,3 +1668,62 @@
+ }
+
+ + #endif /* FREE42_FPTEST */
++--- LIBRARY/makefile.iml_head.old 2011-07-12 15:26:21.000000000 +0000
+++++ LIBRARY/makefile.iml_head 2019-01-17 01:25:09.210000000 +0000
++@@ -177,7 +177,7 @@
++ # returned
++ # ==============================================================================
++
++-__INDICES__ = 1 2 3 4 5 6 7 8 9 10 11
+++__INDICES__ = 1 2 3 4 5 6 7 8 9 10 11 12 13
++
++ GetIndex = $(strip $(word 1,$(if $(word $(words $(__INDICES__)),$2), \
++ $(error "List too large. Adjust __INDICES__"), \
++@@ -344,9 +344,9 @@
++ endif
++ endif
++
++-ARCH_ALIAS := x86 ia64 EM64T x86_64 i686 amd64 Intel64 sun4u
++-ARCH_LIST := IA32 IA64 EFI2 EFI2 IA32 EFI2 EFI2 EFI2
++-ARCH_TYPE := IA32 IA64 EFI2 EFI2 IA32 EFI2 EFI2 EFI2
+++ARCH_ALIAS := x86 ia64 EM64T x86_64 i686 amd64 Intel64 sun4u ppc64 ppc armel aarch64
+++ARCH_LIST := IA32 IA64 EFI2 EFI2 IA32 EFI2 EFI2 EFI2 EFI2 EFI2 EFI2 EFI2
+++ARCH_TYPE := IA32 IA64 EFI2 EFI2 IA32 EFI2 EFI2 EFI2 EFI2 EFI2 EFI2 EFI2
++ ARCH_TYPES := IA32 IA64 EFI2
++
++ UARCH_LIST := SSE GSSE LRB LRB2
++@@ -363,6 +363,16 @@
++ $(error Invalid host architecture $(IML_HOST_ARCH))
++ endif
++
+++ifeq ($(_HOST_ARCH),ppc)
+++ BID_BIG_ENDIAN ?= true
+++ BID_BIG_ENDIAN := $(BID_BIG_ENDIAN)
+++endif
+++
+++ifeq ($(_HOST_ARCH),ppc64)
+++ BID_BIG_ENDIAN ?= true
+++ BID_BIG_ENDIAN := $(BID_BIG_ENDIAN)
+++endif
+++
++ IML_HOST_ARCH_TYPE ?= $(word $(HOST_ARCH_LIST_INDEX),$(ARCH_TYPE))
++ IML_HOST_ARCH_TYPE := $(IML_HOST_ARCH_TYPE)
++ HOST_ARCH_TYPE_INDEX := $(call GetIndex,$(IML_HOST_ARCH_TYPE),$(ARCH_TYPES))
++@@ -492,7 +502,7 @@
++ RM := $(call CselOs, RM, $(_OS_CHOICE), rm -f, del )
++ AR_CMD := $(call CselOsName,AR_CMD,$(_OS_CHOICE), ar rv, ar rv, libtool, lib -nologo)
++ AR_OUT := $(call CselOsName,AR_OUT,$(_OS_CHOICE), , , -o, /out:)$($(IML_TARGET_OS)__space)
++-LD_CMD := $(call CselOsName,LD_CMD,$(_OS_CHOICE),icc,icc,libtool,link /nologo)
+++LD_CMD := $(call CselOsName,LD_CMD,$(_OS_CHOICE),gcc,icc,libtool,link /nologo)
++ LD_OUT := $(call CselOs, LD_OUT, $(_OS_CHOICE), -o, /out:)$($(IML_TARGET_OS)__space)
++ LD_FLAGS := $(call CselOs, LD_FLAGS, $(_OS_CHOICE), -shared -nostdlib,)
++ RC := $(call CselOs, RC, $(_OS_CHOICE), RC_not_to_be_used_with_linux,rc)
++@@ -515,7 +525,7 @@
++
++ ifeq ($(origin CC_NAME),undefined)
++ ifeq ($(origin CC),default)
++- CC_NAME := $(call $(_OS_CHOICE)OsTypeSelect, icc, icl)
+++ CC_NAME := $(call $(_OS_CHOICE)OsTypeSelect, gcc, icl)
++ else
++ __TMP := $(strip $(subst /, ,$(firstword $(CC))))
++ CC_NAME := $(word $(words $(__TMP)), $(__TMP))