deborphan: Add as disabled package
authorFredrik Fornwall <fredrik@fornwall.net>
Thu, 11 Aug 2016 13:34:32 +0000 (09:34 -0400)
committerFredrik Fornwall <fredrik@fornwall.net>
Thu, 11 Aug 2016 13:34:32 +0000 (09:34 -0400)
disabled-packages/deborphan/build.sh [new file with mode: 0644]
disabled-packages/deborphan/configure.patch [new file with mode: 0644]
disabled-packages/deborphan/errno.patch [new file with mode: 0644]
disabled-packages/deborphan/src-Makefile.in.patch [new file with mode: 0644]
disabled-packages/deborphan/src-deborphan.c.patch [new file with mode: 0644]
disabled-packages/deborphan/src-pkginfo.c.patch [new file with mode: 0644]

diff --git a/disabled-packages/deborphan/build.sh b/disabled-packages/deborphan/build.sh
new file mode 100644 (file)
index 0000000..ad3a472
--- /dev/null
@@ -0,0 +1,7 @@
+TERMUX_PKG_HOMEPAGE=https://packages.debian.org/source/sid/deborphan
+TERMUX_PKG_DESCRIPTION="Program that can find unused packages"
+TERMUX_PKG_VERSION=1.7.28.8-0.3
+TERMUX_PKG_SRCURL=http://http.debian.net/debian/pool/main/d/deborphan/deborphan_$TERMUX_PKG_VERSION.tar.gz
+TERMUX_PKG_FOLDERNAME="deborphan"
+TERMUX_PKG_BUILD_IN_SRC=yes
+TERMUX_PKG_MAINTAINER="Pierre Rudloff <contact@rudloff.pro>"
diff --git a/disabled-packages/deborphan/configure.patch b/disabled-packages/deborphan/configure.patch
new file mode 100644 (file)
index 0000000..0057a72
--- /dev/null
@@ -0,0 +1,12 @@
+diff -u -r ../deborphan/configure ./configure
+--- ../deborphan/configure     2016-02-21 09:05:27.000000000 -0500
++++ ./configure        2016-08-11 05:52:10.144221407 -0400
+@@ -2957,7 +2957,7 @@
+-$as_echo "#define STATUS_FILE \"/var/lib/dpkg/status\"" >>confdefs.h
++$as_echo "#define STATUS_FILE \"@TERMUX_PREFIX@/var/lib/dpkg/status\"" >>confdefs.h
+ $as_echo "#define REG_FLAGS REG_ICASE" >>confdefs.h
diff --git a/disabled-packages/deborphan/errno.patch b/disabled-packages/deborphan/errno.patch
new file mode 100644 (file)
index 0000000..0fa5ffa
--- /dev/null
@@ -0,0 +1,25 @@
+diff --git a/src/exit.c b/src/exit.c
+index e76a75e..99cfbdd 100644
+--- a/src/exit.c
++++ b/src/exit.c
+@@ -21,7 +21,6 @@
+
+ #ifdef HAVE_ERRNO_H
+ #  include <errno.h>
+-extern int errno;
+ #endif
+
+ #ifdef ENABLE_NLS
+diff --git a/src/xalloc.c b/src/xalloc.c
+index 8c830e7..43cfb64 100644
+--- a/src/xalloc.c
++++ b/src/xalloc.c
+@@ -22,7 +22,6 @@
+
+ #ifdef HAVE_ERRNO_H
+ #  include <errno.h>
+-extern int errno;
+ #endif
+
+ #ifdef STDC_HEADERS
+
diff --git a/disabled-packages/deborphan/src-Makefile.in.patch b/disabled-packages/deborphan/src-Makefile.in.patch
new file mode 100644 (file)
index 0000000..05d9bb6
--- /dev/null
@@ -0,0 +1,12 @@
+diff -u -r ../deborphan/src/Makefile.in ./src/Makefile.in
+--- ../deborphan/src/Makefile.in       2016-02-21 09:05:27.000000000 -0500
++++ ./src/Makefile.in  2016-08-11 06:13:53.452865872 -0400
+@@ -213,7 +213,7 @@
+ target_alias = @target_alias@
+ deborphan_SOURCES = deborphan.c exit.c libdeps.c pkginfo.c xalloc.c string.c keep.c file.c set.c
+ KEEPNAME = keep
+-STATEDIR = /var/lib/deborphan
++STATEDIR = @TERMUX_PREFIX@/var/lib/deborphan
+ KEEPFILE = $(STATEDIR)/$(KEEPNAME)
+ INCLUDES = -I../include
+ all: all-am
diff --git a/disabled-packages/deborphan/src-deborphan.c.patch b/disabled-packages/deborphan/src-deborphan.c.patch
new file mode 100644 (file)
index 0000000..ef670d0
--- /dev/null
@@ -0,0 +1,12 @@
+diff -u -r ../deborphan/src/deborphan.c ./src/deborphan.c
+--- ../deborphan/src/deborphan.c       2016-02-21 09:05:27.000000000 -0500
++++ ./src/deborphan.c  2016-08-11 06:20:43.718666170 -0400
+@@ -562,8 +562,6 @@
+     if (this->install)
+       check_lib_deps(package, this, print_arch_suffixes);
+-    free_pkg_regex();
+-
+     fflush(stdout);
+     for (i = 0; options[SEARCH] && search_for[i].name; i++) {
diff --git a/disabled-packages/deborphan/src-pkginfo.c.patch b/disabled-packages/deborphan/src-pkginfo.c.patch
new file mode 100644 (file)
index 0000000..adcc413
--- /dev/null
@@ -0,0 +1,24 @@
+diff -u -r ../deborphan/src/pkginfo.c ./src/pkginfo.c
+--- ../deborphan/src/pkginfo.c 2016-02-21 09:05:27.000000000 -0500
++++ ./src/pkginfo.c    2016-08-11 06:10:28.211955162 -0400
+@@ -106,10 +106,16 @@
+     regfree(&re_statushold);
+     regfree(&re_statusconfig);
+     regfree(&re_status);
+-    regfree(&re_namedev);
+-    regfree(&re_gnugrepv);
+-    regfree(&re_descdummy);
+-    regfree(&re_desctransit);
++    if (options[GUESS]) {
++        if (!guess_unique(GUESS_SECTION))
++            regfree(&re_namedev);
++        if (guess_chk(GUESS_SECTION))
++            regfree(&re_gnugrepv);
++        if (guess_chk(GUESS_DUMMY)) {
++            regfree(&re_descdummy);
++            regfree(&re_desctransit);
++        }
++    }
+ }
+ /* A similar "hack" was created by Paul Martin a while ago. It was not