Browse Source

disabled-packages/apt: Shed some weight

android-5
Fredrik Fornwall 8 years ago
parent
commit
ee5e9ab16f
  1. 56
      disabled-packages/apt/CMakeLists.txt.patch
  2. 11
      disabled-packages/apt/apt-pkg-CMakeLists.txt.patch
  3. 32
      disabled-packages/apt/apt-pkg-contrib-fileutl.patch
  4. 19
      disabled-packages/apt/apt-pkg-contrib-strutl.cc.patch
  5. 34
      disabled-packages/apt/build.sh
  6. 36
      disabled-packages/apt/cmakelist.patch64

56
disabled-packages/apt/cmakelist.patch32 → disabled-packages/apt/CMakeLists.txt.patch

@ -1,28 +1,52 @@
--- ../cache/apt-1.4.7/CMakeLists.txt 2017-07-14 07:45:39.000000000 +1000 diff -u -r ../apt-1.4.7/CMakeLists.txt ./CMakeLists.txt
+++ ./CMakeLists.txt 2017-07-20 13:31:00.727044330 +1000 --- ../apt-1.4.7/CMakeLists.txt 2017-07-13 23:45:39.000000000 +0200
@@ -33,7 +33,7 @@ +++ ./CMakeLists.txt 2017-07-23 23:24:06.877483680 +0200
@@ -33,7 +33,6 @@
include(GNUInstallDirs) include(GNUInstallDirs)
include(TestBigEndian) include(TestBigEndian)
find_package(Threads) find_package(Threads)
-find_package(LFS REQUIRED) -find_package(LFS REQUIRED)
+# find_package(LFS REQUIRED)
find_package(Iconv REQUIRED) find_package(Iconv REQUIRED)
find_package(Perl REQUIRED) find_package(Perl REQUIRED)
@@ -45,9 +45,9 @@ @@ -44,11 +43,6 @@
include_directories(${Intl_INCLUDE_DIRS})
endif() endif()
# Add large file support -# Add large file support
-add_compile_options(${LFS_COMPILE_OPTIONS}) -add_compile_options(${LFS_COMPILE_OPTIONS})
-add_definitions(${LFS_DEFINITIONS}) -add_definitions(${LFS_DEFINITIONS})
-link_libraries(${LFS_LIBRARIES}) -link_libraries(${LFS_LIBRARIES})
+# add_compile_options(${LFS_COMPILE_OPTIONS}) -
+# add_definitions(${LFS_DEFINITIONS})
+# link_libraries(${LFS_LIBRARIES})
# Set compiler flags # Set compiler flags
set(CMAKE_CXX_STANDARD 11) 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() endif()
@ -33,7 +57,7 @@
# Mount()ing and stat()ing and friends # Mount()ing and stat()ing and friends
check_symbol_exists(statfs sys/vfs.h HAVE_VFS_H) 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}") message(STATUS "Found dpkg data dir: ${DPKG_DATADIR_CMD}")
set(DPKG_DATADIR "${DPKG_DATADIR_CMD}" CACHE PATH "dpkg data directory") set(DPKG_DATADIR "${DPKG_DATADIR_CMD}" CACHE PATH "dpkg data directory")
endif() endif()
@ -48,11 +72,15 @@
if (NOT DEFINED ROOT_GROUP) if (NOT DEFINED ROOT_GROUP)
execute_process(COMMAND id -gn root execute_process(COMMAND id -gn root
OUTPUT_VARIABLE ROOT_GROUP OUTPUT_STRIP_TRAILING_WHITESPACE) OUTPUT_VARIABLE ROOT_GROUP OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -211,7 +207,6 @@ @@ -211,11 +189,8 @@
add_subdirectory(apt-inst) add_subdirectory(apt-inst)
add_subdirectory(cmdline) add_subdirectory(cmdline)
add_subdirectory(completions) add_subdirectory(completions)
-add_subdirectory(doc) -add_subdirectory(doc)
add_subdirectory(dselect) add_subdirectory(dselect)
add_subdirectory(ftparchive) -add_subdirectory(ftparchive)
add_subdirectory(methods) add_subdirectory(methods)
-add_subdirectory(test)
if (USE_NLS)
add_subdirectory(po)

11
disabled-packages/apt/apt-pkg-CMakeLists.txt.patch

@ -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})

32
disabled-packages/apt/apt-pkg-contrib-fileutl.patch

@ -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
*

19
disabled-packages/apt/apt-pkg-contrib-strutl.cc.patch

@ -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 /*{{{*/
// ---------------------------------------------------------------------

34
disabled-packages/apt/build.sh

@ -1,18 +1,40 @@
TERMUX_PKG_HOMEPAGE=https://packages.debian.org/apt TERMUX_PKG_HOMEPAGE=https://packages.debian.org/apt
TERMUX_PKG_DESCRIPTION="Front-end for the dpkg package manager" 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_VERSION=1.4.7
TERMUX_PKG_SRCURL=http://ftp.debian.org/debian/pool/main/a/apt/apt_${TERMUX_PKG_VERSION}.tar.xz TERMUX_PKG_SRCURL=http://ftp.debian.org/debian/pool/main/a/apt/apt_${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=ea2a2e8e08daf8ea11aeaa86928d943a42ce53989165a30cc828838d470b7719 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_FOLDERNAME=apt-${TERMUX_PKG_VERSION}
TERMUX_PKG_ESSENTIAL=yes TERMUX_PKG_ESSENTIAL=yes
TERMUX_PKG_CONFFILES="etc/apt/sources.list" TERMUX_PKG_CONFFILES="etc/apt/sources.list"
termux_step_pre_configure () { TERMUX_PKG_CONFLICTS=apt-transport-https
LDFLAGS+=" -landroid-glob" 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() { 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/ cp $TERMUX_PKG_BUILDER_DIR/trusted.gpg $TERMUX_PREFIX/etc/apt/
rm /data/data/com.termux/files/usr/include/apt-pkg -r rm /data/data/com.termux/files/usr/include/apt-pkg -r
} }

36
disabled-packages/apt/cmakelist.patch64

@ -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)
Loading…
Cancel
Save