disabled-packages/apt: Shed some weight
authorFredrik Fornwall <fredrik@fornwall.net>
Sun, 23 Jul 2017 21:42:07 +0000 (23:42 +0200)
committerFredrik Fornwall <fredrik@fornwall.net>
Sun, 23 Jul 2017 21:42:07 +0000 (23:42 +0200)
disabled-packages/apt/CMakeLists.txt.patch [moved from disabled-packages/apt/cmakelist.patch32 with 59% similarity]
disabled-packages/apt/apt-pkg-CMakeLists.txt.patch [new file with mode: 0644]
disabled-packages/apt/apt-pkg-contrib-fileutl.patch [new file with mode: 0644]
disabled-packages/apt/apt-pkg-contrib-strutl.cc.patch [new file with mode: 0644]
disabled-packages/apt/build.sh
disabled-packages/apt/cmakelist.patch64 [deleted file]

similarity index 59%
rename from disabled-packages/apt/cmakelist.patch32
rename to disabled-packages/apt/CMakeLists.txt.patch
index 4a37808..7dc3b88 100644 (file)
@@ -1,28 +1,52 @@
---- ../cache/apt-1.4.7/CMakeLists.txt  2017-07-14 07:45:39.000000000 +1000
-+++ ./CMakeLists.txt   2017-07-20 13:31:00.727044330 +1000
-@@ -33,7 +33,7 @@
+diff -u -r ../apt-1.4.7/CMakeLists.txt ./CMakeLists.txt
+--- ../apt-1.4.7/CMakeLists.txt        2017-07-13 23:45:39.000000000 +0200
++++ ./CMakeLists.txt   2017-07-23 23:24:06.877483680 +0200
+@@ -33,7 +33,6 @@
  include(GNUInstallDirs)
  include(TestBigEndian)
  find_package(Threads)
 -find_package(LFS REQUIRED)
-+# find_package(LFS REQUIRED)
  find_package(Iconv REQUIRED)
  
  find_package(Perl REQUIRED)
-@@ -45,9 +45,9 @@
+@@ -44,11 +43,6 @@
+   include_directories(${Intl_INCLUDE_DIRS})
  endif()
  
- # Add large file support
+-# Add large file support
 -add_compile_options(${LFS_COMPILE_OPTIONS})
 -add_definitions(${LFS_DEFINITIONS})
 -link_libraries(${LFS_LIBRARIES})
-+# add_compile_options(${LFS_COMPILE_OPTIONS})
-+# add_definitions(${LFS_DEFINITIONS})
-+# link_libraries(${LFS_LIBRARIES})
+-
  # Set compiler flags
  set(CMAKE_CXX_STANDARD 11)
-@@ -100,10 +100,6 @@
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
+@@ -69,13 +63,6 @@
+ add_optional_compile_options(Wsign-promo)
+ add_optional_compile_options(Wundef)
+-# apt-ftparchive dependencies
+-find_package(BerkeleyDB REQUIRED)
+-if (BERKELEY_DB_FOUND)
+-  set(HAVE_BDB 1)
+-endif()
+-
+-
+ # apt-transport-https dependencies
+ find_package(CURL REQUIRED)
+ if (CURL_FOUND)
+@@ -89,21 +76,12 @@
+ endif()
+-find_package(BZip2)
+-if (BZIP2_FOUND)
+-  set(HAVE_BZ2 1)
+-endif()
+-
+ find_package(LZMA)
+ if (LZMA_FOUND)
+   set(HAVE_LZMA 1)
  endif()
  
  
@@ -33,7 +57,7 @@
  
  # Mount()ing and stat()ing and friends
  check_symbol_exists(statfs sys/vfs.h HAVE_VFS_H)
-@@ -180,10 +176,10 @@
+@@ -180,10 +158,10 @@
    message(STATUS "Found dpkg data dir: ${DPKG_DATADIR_CMD}")
    set(DPKG_DATADIR "${DPKG_DATADIR_CMD}" CACHE PATH "dpkg data directory")
  endif()
  if (NOT DEFINED ROOT_GROUP)
    execute_process(COMMAND id -gn root
                    OUTPUT_VARIABLE ROOT_GROUP OUTPUT_STRIP_TRAILING_WHITESPACE)
-@@ -211,7 +207,6 @@
+@@ -211,11 +189,8 @@
  add_subdirectory(apt-inst)
  add_subdirectory(cmdline)
  add_subdirectory(completions)
 -add_subdirectory(doc)
  add_subdirectory(dselect)
- add_subdirectory(ftparchive)
+-add_subdirectory(ftparchive)
  add_subdirectory(methods)
+-add_subdirectory(test)
+ if (USE_NLS)
+ add_subdirectory(po)
diff --git a/disabled-packages/apt/apt-pkg-CMakeLists.txt.patch b/disabled-packages/apt/apt-pkg-CMakeLists.txt.patch
new file mode 100644 (file)
index 0000000..8d45966
--- /dev/null
@@ -0,0 +1,11 @@
+diff -u -r ../apt-1.4.7/apt-pkg/CMakeLists.txt ./apt-pkg/CMakeLists.txt
+--- ../apt-1.4.7/apt-pkg/CMakeLists.txt        2017-07-13 23:45:39.000000000 +0200
++++ ./apt-pkg/CMakeLists.txt   2017-07-23 23:40:55.825893751 +0200
+@@ -54,7 +54,6 @@
+                              ${BZIP2_LIBRARIES}
+                              ${LZMA_LIBRARIES}
+                              ${LZ4_LIBRARIES}
+-                             ${ICONV_LIBRARIES}
+ )
+ set_target_properties(apt-pkg PROPERTIES VERSION ${MAJOR}.${MINOR})
+ set_target_properties(apt-pkg PROPERTIES SOVERSION ${MAJOR})
diff --git a/disabled-packages/apt/apt-pkg-contrib-fileutl.patch b/disabled-packages/apt/apt-pkg-contrib-fileutl.patch
new file mode 100644 (file)
index 0000000..7f356fd
--- /dev/null
@@ -0,0 +1,32 @@
+diff -u -r ../apt-1.4.7/apt-pkg/contrib/fileutl.cc ./apt-pkg/contrib/fileutl.cc
+--- ../apt-1.4.7/apt-pkg/contrib/fileutl.cc    2017-07-13 23:45:39.000000000 +0200
++++ ./apt-pkg/contrib/fileutl.cc       2017-07-23 21:02:20.571611631 +0200
+@@ -2752,6 +2752,7 @@
+ }
+                                                                       /*}}}*/
++#ifndef __ANDROID__
+ // Glob - wrapper around "glob()"                                     /*{{{*/
+ std::vector<std::string> Glob(std::string const &pattern, int flags)
+ {
+@@ -2777,6 +2778,7 @@
+    globfree(&globbuf);
+    return result;
+ }
++#endif
+                                                                       /*}}}*/
+ static std::string APT_NONNULL(1) GetTempDirEnv(char const * const env)       /*{{{*/
+ {
+diff -u -r ../apt-1.4.7/apt-pkg/contrib/fileutl.h ./apt-pkg/contrib/fileutl.h
+--- ../apt-1.4.7/apt-pkg/contrib/fileutl.h     2017-07-13 23:45:39.000000000 +0200
++++ ./apt-pkg/contrib/fileutl.h        2017-07-23 21:02:02.051824374 +0200
+@@ -239,7 +239,9 @@
+ APT_HIDDEN std::string flNormalize(std::string file);
+ // simple c++ glob
++#ifndef __ANDROID__
+ std::vector<std::string> Glob(std::string const &pattern, int flags=0);
++#endif
+ /** \brief Popen() implementation that execv() instead of using a shell
+  *
diff --git a/disabled-packages/apt/apt-pkg-contrib-strutl.cc.patch b/disabled-packages/apt/apt-pkg-contrib-strutl.cc.patch
new file mode 100644 (file)
index 0000000..fdb5d24
--- /dev/null
@@ -0,0 +1,19 @@
+diff -u -r ../apt-1.4.7/apt-pkg/contrib/strutl.cc ./apt-pkg/contrib/strutl.cc
+--- ../apt-1.4.7/apt-pkg/contrib/strutl.cc     2017-07-13 23:45:39.000000000 +0200
++++ ./apt-pkg/contrib/strutl.cc        2017-07-23 22:58:23.103247428 +0200
+@@ -100,6 +100,7 @@
+ }
+ }
+                                                                       /*}}}*/
++#ifndef __ANDROID__
+ // UTF8ToCodeset - Convert some UTF-8 string for some codeset         /*{{{*/
+ // ---------------------------------------------------------------------
+ /* This is handy to use before display some information for enduser  */
+@@ -169,6 +170,7 @@
+   return true;
+ }
++#endif
+                                                                       /*}}}*/
+ // strstrip - Remove white space from the front and back of a string  /*{{{*/
+ // ---------------------------------------------------------------------
index 7456b6d..e45b104 100644 (file)
@@ -1,18 +1,40 @@
 TERMUX_PKG_HOMEPAGE=https://packages.debian.org/apt
 TERMUX_PKG_DESCRIPTION="Front-end for the dpkg package manager"
-TERMUX_PKG_DEPENDS="libutil, libandroid-glob, libbz2, liblzma, dpkg, gpgv, libc++"
+TERMUX_PKG_DEPENDS="libutil, libcurl, liblzma, dpkg, gpgv, libc++"
 TERMUX_PKG_VERSION=1.4.7
 TERMUX_PKG_SRCURL=http://ftp.debian.org/debian/pool/main/a/apt/apt_${TERMUX_PKG_VERSION}.tar.xz
 TERMUX_PKG_SHA256=ea2a2e8e08daf8ea11aeaa86928d943a42ce53989165a30cc828838d470b7719
-TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" -DCOMMON_ARCH=$TERMUX_ARCH -DUSE_NLS=OFF -DDPKG_DATADIR=$TERMUX_PREFIX/share/dpkg -DCMAKE_INSTALL_FULL_LOCALSTATEDIR=$TERMUX_PREFIX"
+TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
+-DCMAKE_INSTALL_FULL_LOCALSTATEDIR=$TERMUX_PREFIX
+-DCOMMON_ARCH=$TERMUX_ARCH
+-DDPKG_DATADIR=$TERMUX_PREFIX/share/dpkg
+-DUSE_NLS=OFF
+-DWITH_DOC=OFF
+"
 TERMUX_PKG_FOLDERNAME=apt-${TERMUX_PKG_VERSION}
 TERMUX_PKG_ESSENTIAL=yes
 TERMUX_PKG_CONFFILES="etc/apt/sources.list"
-termux_step_pre_configure () {
-       LDFLAGS+=" -landroid-glob"
-}
+TERMUX_PKG_CONFLICTS=apt-transport-https
+TERMUX_PKG_REPLACES=apt-transport-https
+TERMUX_PKG_RM_AFTER_INSTALL="
+bin/apt-cdrom
+bin/apt-extracttemplates
+bin/apt-mark
+bin/apt-sortpkgs
+etc/apt/apt.conf.d
+lib/apt/apt-helper
+lib/apt/methods/bzip2
+lib/apt/methods/cdrom
+lib/apt/methods/mirror
+lib/apt/methods/rred
+lib/apt/planners/
+lib/apt/solvers/
+lib/dpkg/
+lib/libapt-inst.so
+"
+
 termux_step_post_make_install() {
-       printf "# The main termux repository:\ndeb [arch=all,${TERMUX_ARCH}] http://termux.net stable main\n" > $TERMUX_PREFIX/etc/apt/sources.list
+       printf "# The main termux repository:\ndeb [arch=all,${TERMUX_ARCH}] https://termux.net stable main\n" > $TERMUX_PREFIX/etc/apt/sources.list
         cp $TERMUX_PKG_BUILDER_DIR/trusted.gpg $TERMUX_PREFIX/etc/apt/
        rm /data/data/com.termux/files/usr/include/apt-pkg -r
 }
diff --git a/disabled-packages/apt/cmakelist.patch64 b/disabled-packages/apt/cmakelist.patch64
deleted file mode 100644 (file)
index 791b675..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
---- ../cache/apt-1.4.7/CMakeLists.txt  2017-07-14 07:45:39.000000000 +1000
-+++ ./CMakeLists.txt   2017-07-20 13:44:59.821008899 +1000
-@@ -100,10 +100,6 @@
- endif()
--find_package(LZ4)
--if (LZ4_FOUND)
--  set(HAVE_LZ4 1)
--endif()
- # Mount()ing and stat()ing and friends
- check_symbol_exists(statfs sys/vfs.h HAVE_VFS_H)
-@@ -180,10 +176,10 @@
-   message(STATUS "Found dpkg data dir: ${DPKG_DATADIR_CMD}")
-   set(DPKG_DATADIR "${DPKG_DATADIR_CMD}" CACHE PATH "dpkg data directory")
- endif()
--if (NOT DEFINED COMMON_ARCH)
--  execute_process(COMMAND dpkg-architecture -qDEB_HOST_ARCH
--                  OUTPUT_VARIABLE COMMON_ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
--endif()
-+# if (NOT DEFINED COMMON_ARCH)
-+#  execute_process(COMMAND dpkg-architecture -qDEB_HOST_ARCH
-+                  #OUTPUT_VARIABLE COMMON_ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
-+# endif()
- if (NOT DEFINED ROOT_GROUP)
-   execute_process(COMMAND id -gn root
-                   OUTPUT_VARIABLE ROOT_GROUP OUTPUT_STRIP_TRAILING_WHITESPACE)
-@@ -211,7 +207,6 @@
- add_subdirectory(apt-inst)
- add_subdirectory(cmdline)
- add_subdirectory(completions)
--add_subdirectory(doc)
- add_subdirectory(dselect)
- add_subdirectory(ftparchive)
- add_subdirectory(methods)