Subject: [PATCH 1/5] testing/libtifiles: new aport

From: Drew DeVault <[email-masked]>
Date: Sun, 06 Dec 2020 14:03:42 GMT

---
 testing/libtifiles/APKBUILD | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 testing/libtifiles/APKBUILD

diff --git a/testing/libtifiles/APKBUILD b/testing/libtifiles/APKBUILD
new file mode 100644
index 0000000000..f5b6d4d118
--- /dev/null
+++ b/testing/libtifiles/APKBUILD
@@ -0,0 +1,28 @@
+# Maintainer:
+pkgname=libtifiles
+pkgver=1.1.7
+pkgrel=0
+pkgdesc="Texas Instruments file format library"
+url="http://lpg.ticalc.org/prj_tilp/"
+arch="all"
+license="GPL-2.0-only"
+makedepends="bzip2 libusb-dev libarchive-dev libticonv-dev libtool"
+subpackages="$pkgname-dev"
+source="
+	$pkgname-$pkgver.tar.bz2::http://downloads.sourceforge.net/project/tilp/tilp2-linux/tilp2-1.18/${pkgname}2-$pkgver.tar.bz2
+"
+options="!check" # No upstream tests
+builddir="$srcdir/${pkgname}2-$pkgver"
+
+build() {
+	cd "$builddir"
+	autoreconf -if
+	./configure --prefix=/usr
+}
+
+package() {
+	make install DESTDIR="$pkgdir"
+	rm -rf "$pkgdir"/usr/share/locale
+}
+
+sha512sums="e2ef4de0ce8c78f0da4098ec618a7194f9b94a028f9cb54a0ea1c29c00028d7cf144a067d8aaf8010ad094378b6426d05621d530cfbfa05f793f6c1ed41fcaef  libtifiles-1.1.7.tar.bz2"
-- 
2.29.2

---

From: Drew DeVault <[email-masked]>
Date: Sun, 06 Dec 2020 14:03:42 GMT

---
 testing/libticables/69-libticables.rules | 18 +++++++++++++
 testing/libticables/APKBUILD             | 32 ++++++++++++++++++++++++
 2 files changed, 50 insertions(+)
 create mode 100644 testing/libticables/69-libticables.rules
 create mode 100644 testing/libticables/APKBUILD

diff --git a/testing/libticables/69-libticables.rules b/testing/libticables/69-libticables.rules
new file mode 100644
index 0000000000..edf812c30e
--- /dev/null
+++ b/testing/libticables/69-libticables.rules
@@ -0,0 +1,18 @@
+ACTION!="add", GOTO="libticables_end"
+
+# serial device (assume TI calculator)
+KERNEL=="ttyS[0-3]", ENV{ID_PDA}="1"
+# parallel device (assume TI calculator)
+SUBSYSTEM=="ppdev", ENV{ID_PDA}="1"
+# SilverLink
+SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="e001", ENV{ID_PDA}="1"
+# TI-84+ DirectLink
+SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="e003", ENV{ID_PDA}="1"
+# TI-89 Titanium DirectLink
+SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="e004", ENV{ID_PDA}="1"
+# TI-84+ SE DirectLink
+SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="e008", ENV{ID_PDA}="1"
+# TI-Nspire DirectLink
+SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="e012", ENV{ID_PDA}="1"
+
+LABEL="libticables_end"
diff --git a/testing/libticables/APKBUILD b/testing/libticables/APKBUILD
new file mode 100644
index 0000000000..03ba8d8bd6
--- /dev/null
+++ b/testing/libticables/APKBUILD
@@ -0,0 +1,32 @@
+# Maintainer:
+pkgname=libticables
+pkgver=1.3.5
+pkgrel=0
+pkgdesc="Texas Instruments link cable library"
+url="http://lpg.ticalc.org/prj_tilp/"
+arch="all"
+license="GPL-2.0-only"
+makedepends="bzip2 libusb-dev libtool glib-dev"
+subpackages="$pkgname-dev"
+source="
+	$pkgname-$pkgver.tar.bz2::http://downloads.sourceforge.net/project/tilp/tilp2-linux/tilp2-1.18/${pkgname}2-$pkgver.tar.bz2
+	69-libticables.rules
+"
+options="!check" # No upstream tests
+builddir="$srcdir/${pkgname}2-$pkgver"
+
+build() {
+	cd "$builddir"
+	autoreconf -if
+	./configure --prefix=/usr --enable-libusb10
+}
+
+package() {
+	make install DESTDIR="$pkgdir"
+	rm -rf "$pkgdir"/usr/share/locale
+	install -Dm644 "$srcdir/69-libticables.rules" \
+		"$pkgdir/usr/lib/udev/rules.d/69-libticables.rules"
+}
+
+sha512sums="171abdf41f496891c62da17a2b84d929ac32021b0f2abc0c37ed73ec93806d4a14df37a8ffbe2b0c172ff3461aa6c639fc1ba23aafb19e024b99448dd66c63bd  libticables-1.3.5.tar.bz2
+423e0fcf072e7f4460ca00dedcc8839c3e22515f353813a058324dff0624c1eebcbd2385ca425fad351262520a30309d6d2a3148e4c0a5ec326eddb1428dbe1c  69-libticables.rules"
-- 
2.29.2

---

From: Drew DeVault <[email-masked]>
Date: Sun, 06 Dec 2020 14:03:43 GMT

---
 testing/libticonv/APKBUILD | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 testing/libticonv/APKBUILD

diff --git a/testing/libticonv/APKBUILD b/testing/libticonv/APKBUILD
new file mode 100644
index 0000000000..0fa52bcb9f
--- /dev/null
+++ b/testing/libticonv/APKBUILD
@@ -0,0 +1,25 @@
+# Maintainer:
+pkgname=libticonv
+pkgver=1.1.5
+pkgrel=0
+pkgdesc="Texas Instruments character set conversion library"
+url="http://lpg.ticalc.org/prj_tilp/"
+arch="all"
+license="GPL-2.0-only"
+makedepends="bzip2 glib-dev libtool"
+subpackages="$pkgname-dev"
+source="$pkgname-$pkgver.tar.bz2::http://downloads.sourceforge.net/project/tilp/tilp2-linux/tilp2-1.18/$pkgname-$pkgver.tar.bz2"
+options="!check" # No upstream tests
+
+build() {
+	cd "$builddir"
+	autoreconf -if
+	./configure --prefix=/usr --enable-iconv
+}
+
+package() {
+	make install DESTDIR="$pkgdir"
+	rm -rf "$pkgdir"/usr/share/locale
+}
+
+sha512sums="ea589344a656c5c7d28ed45e8da36bf7b746b7a82d77a257ddd305e2ebdc34f0ae14a6090e991f47ef7ad37cdc8d7182181c705fb0814e671ef764ca2a6dc2bf  libticonv-1.1.5.tar.bz2"
-- 
2.29.2

---

From: Drew DeVault <[email-masked]>
Date: Sun, 06 Dec 2020 14:03:43 GMT

---
 testing/libticalcs/APKBUILD | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 testing/libticalcs/APKBUILD

diff --git a/testing/libticalcs/APKBUILD b/testing/libticalcs/APKBUILD
new file mode 100644
index 0000000000..b7c45b2fd5
--- /dev/null
+++ b/testing/libticalcs/APKBUILD
@@ -0,0 +1,28 @@
+# Maintainer:
+pkgname=libticalcs
+pkgver=1.1.9
+pkgrel=0
+pkgdesc="Texas Instruments calculator library"
+url="http://lpg.ticalc.org/prj_tilp/"
+arch="all"
+license="GPL-2.0-only"
+makedepends="bzip2 libticables-dev libtifiles-dev libtool"
+subpackages="$pkgname-dev"
+source="
+	$pkgname-$pkgver.tar.bz2::http://downloads.sourceforge.net/project/tilp/tilp2-linux/tilp2-1.18/${pkgname}2-$pkgver.tar.bz2
+"
+options="!check" # No upstream tests
+builddir="$srcdir/${pkgname}2-$pkgver"
+
+build() {
+	cd "$builddir"
+	autoreconf -if
+	./configure --prefix=/usr
+}
+
+package() {
+	make install DESTDIR="$pkgdir"
+	rm -rf "$pkgdir"/usr/share/locale
+}
+
+sha512sums="a55fa92df787929397f4ed3e8f922355f71c7883459ceb98fbb8d39d18f06441147188aaabf7a67083d70549443e439744e68527742e2b7b5d3d2838cc41b4da  libticalcs-1.1.9.tar.bz2"
-- 
2.29.2

---

From: Drew DeVault <[email-masked]>
Date: Sun, 06 Dec 2020 14:03:44 GMT

---
 testing/tilp/APKBUILD                        | 29 +++++++++
 testing/tilp/remove-broken-kde-support.patch | 68 ++++++++++++++++++++
 2 files changed, 97 insertions(+)
 create mode 100644 testing/tilp/APKBUILD
 create mode 100644 testing/tilp/remove-broken-kde-support.patch

diff --git a/testing/tilp/APKBUILD b/testing/tilp/APKBUILD
new file mode 100644
index 0000000000..45ff4f120b
--- /dev/null
+++ b/testing/tilp/APKBUILD
@@ -0,0 +1,29 @@
+# Maintainer:
+pkgname=tilp
+pkgver=1.18
+pkgrel=0
+pkgdesc="TI graphing calculator link/transfer program"
+url="http://lpg.ticalc.org/prj_tilp/"
+arch="all"
+license="GPL-2.0-only"
+makedepends="bzip2 libticalcs-dev gtk+2.0-dev libtool"
+source="
+	$pkgname-$pkgver.tar.bz2::http://downloads.sourceforge.net/project/tilp/tilp2-linux/tilp2-1.18/${pkgname}2-$pkgver.tar.bz2
+	remove-broken-kde-support.patch
+"
+options="!check" # No upstream tests
+builddir="$srcdir/${pkgname}2-$pkgver"
+
+build() {
+	cd "$builddir"
+	autoreconf -if
+	./configure --prefix=/usr
+}
+
+package() {
+	make install DESTDIR="$pkgdir"
+	rm -rf "$pkgdir"/usr/share/locale
+}
+
+sha512sums="8e46337e1ac7de85d88d4cb677910a099cdb6d3f473cdf8ca751a45dd66410b11751cd4555116c9249aa53bd23105957b4b2af2247968ec840da68aeed105f5f  tilp-1.18.tar.bz2
+f7e946ca41bbfe415adabd59d5dd8234af7049c8902a2abec0911db0014aed11374cd98e34cb65cad15261eaf1bbfbc4c3641217cdff6b6639c749557983d8b7  remove-broken-kde-support.patch"
diff --git a/testing/tilp/remove-broken-kde-support.patch b/testing/tilp/remove-broken-kde-support.patch
new file mode 100644
index 0000000000..cd191ab047
--- /dev/null
+++ b/testing/tilp/remove-broken-kde-support.patch
@@ -0,0 +1,68 @@
+diff -aur --no-dereference package.pristine/configure.ac package.new/configure.ac
+--- package.pristine/configure.ac	2016-01-15 21:28:52.000000000 +0100
++++ package.new/configure.ac	2017-05-30 23:56:19.028317110 +0200
+@@ -118,22 +118,23 @@
+ CFLAGS="$CFLAGS $ARCH"
+ 
+ # KDE dialogs support
+-AC_ARG_WITH(kde, AC_HELP_STRING([--with-kde], [Compile with KDE support]), [kde=$withval], [kde=no])
+-if test "x$kde" = "xdefault"; then
+-  case $host_os in
+-    *mingw*)
+-      kde=no
+-      ;;
+-    *)
+-      kde=yes
+-      ;;
+-  esac
+-fi
+-if test "x$kde" = "xyes"; then
+-        AC_PROG_CXX
+-        AC_PATH_KDE
+-        AC_DEFINE(WITH_KDE, 1, [Use KDE support])
+-fi
++#AC_ARG_WITH(kde, AC_HELP_STRING([--with-kde], [Compile with KDE support]), [kde=$withval], [kde=no])
++#if test "x$kde" = "xdefault"; then
++#  case $host_os in
++#    *mingw*)
++#      kde=no
++#      ;;
++#    *)
++#      kde=yes
++#      ;;
++#  esac
++#fi
++#if test "x$kde" = "xyes"; then
++#        AC_PROG_CXX
++#        AC_PATH_KDE
++#        AC_DEFINE(WITH_KDE, 1, [Use KDE support])
++#fi
++kde=no
+ AM_CONDITIONAL(USE_KDE, test "x$kde" = "xyes")
+ AC_SUBST(kde)
+ 
+diff -aur --no-dereference package.pristine/src/Makefile.am package.new/src/Makefile.am
+--- package.pristine/src/Makefile.am	2016-03-14 20:55:57.000000000 +0100
++++ package.new/src/Makefile.am	2017-05-31 00:03:11.171739478 +0200
+@@ -9,16 +9,16 @@
+ tilp_CPPFLAGS = -I$(top_srcdir)/intl \
+ 	@TICABLES_CFLAGS@ @TIFILES_CFLAGS@ @TICALCS_CFLAGS@ @TICONV_CFLAGS@ \
+ 	@GLIB_CFLAGS@ @GTK_CFLAGS@ \
+-	@KDE_INCLUDES@ @QT_INCLUDES@ \
+ 	-DSHARE_DIR=\"$(pkgdatadir)\" \
+ 	-DLOCALEDIR=\"$(datadir)/locale\" \
+ 	-DSYSCONFDIR=\"$(sysconfdir)\" \
+ 	-DGTK_DISABLE_DEPRECATED
++#	@KDE_INCLUDES@ @QT_INCLUDES@
+ tilp_LDFLAGS = -export-dynamic
+ tilp_LDADD = @TICABLES_LIBS@ @TIFILES_LIBS@ @TICALCS_LIBS@ @TICONV_LIBS@ \
+-	@GLIB_LIBS@ @GTK_LIBS@ \
+-	@LIB_KDECORE@ @LIB_KDEUI@ @LIB_KIO@ @LIB_QT@ @KDE_LDFLAGS@ \
+-	@QT_LDFLAGS@ @X_LDFLAGS@ @LIBZ@
++	@GLIB_LIBS@ @GTK_LIBS@ @LIBZ@
++#	@LIB_KDECORE@ @LIB_KDEUI@ @LIB_KIO@ @LIB_QT@ @KDE_LDFLAGS@ \
++#	@QT_LDFLAGS@ @X_LDFLAGS@
+ tilp_SOURCES = *.h \
+ 	tilp_calcs.c tilp_cmdline.c tilp_config.c tilp_error.c \
+ 	tilp_files.c tilp_gif.c tilp_main.c \
+
-- 
2.29.2