From b769336121fe60b2741dcb096b2af47818ac63b4 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sat, 24 Apr 2021 16:17:01 +0200 Subject: extra/postfix: no mysql on i486 --- extra/postfix/PKGBUILD | 27 ++++++++++-- extra/postfix/postfix-3.5.10-no-mysql.patch | 68 +++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+), 3 deletions(-) create mode 100644 extra/postfix/postfix-3.5.10-no-mysql.patch (limited to 'extra/postfix') diff --git a/extra/postfix/PKGBUILD b/extra/postfix/PKGBUILD index a6e73395..79e1e48f 100644 --- a/extra/postfix/PKGBUILD +++ b/extra/postfix/PKGBUILD @@ -1,11 +1,32 @@ # do not make postfix depend on a micro-optimized Mysql (for i486) if [ "${CARCH}" = "i486" ]; then - depends=(${depends[@]//mariadb-libs/}) + makedepends=(${makedepends[@]//mariadb-libs/}) eval "$( declare -f build | \ sed ' - s|-DHAS_MYSQL -I/usr/include/mysql||g - s|-lmysqlclient||g + s|'-DHAS_MYSQL' '-I/usr/include/mysql'||g ' )" + + source+=(postfix-3.5.10-no-mysql.patch) + sha512sums+=('48598226c220caa2b58be25727f3f0d978beef5c6f42f4dfd8e97a32125739d3b15ef8328c17f9ab8b0d659c13ae6902afb5c5d2257cabe02e9f5efa8ea7d4f8') + b2sums+=('df89a8bdf214af3253c9967749c36ae6cd48cb1fee1a38a349180599ad59b700764e83c6b19cba49866ffbe6d34d0c2f710affa240e0e89fec5256fc0ede9f0f') + + eval "$( + declare -f prepare | \ + sed ' + /main_defaults.patch/a patch -p1 -i ${srcdir}/postfix-3.5.10-no-mysql.patch + ' + declare -f package_postfix | \ + sed ' + /for _feature/s/,mysql//g + s/LD_LIBRARY_PATH/touch lib\/postfix-mysql.so; LD_LIBRARY_PATH/ + ' + declare -f package_postfix-mysql | \ + sed ' + 3 i if false; then + $ i fi + ' + ) + " fi diff --git a/extra/postfix/postfix-3.5.10-no-mysql.patch b/extra/postfix/postfix-3.5.10-no-mysql.patch new file mode 100644 index 00000000..66e76d90 --- /dev/null +++ b/extra/postfix/postfix-3.5.10-no-mysql.patch @@ -0,0 +1,68 @@ +diff -rauN postfix-3.5.10/src/global/Makefile.in postfix-3.5.10-no-mysql-patch/src/global/Makefile.in +--- postfix-3.5.10/src/global/Makefile.in 2020-01-12 14:50:56.000000000 +0100 ++++ postfix-3.5.10-no-mysql-patch/src/global/Makefile.in 2021-04-24 15:50:04.422293236 +0200 +@@ -3,7 +3,7 @@ + canon_addr.c cfg_parser.c cleanup_strerror.c cleanup_strflags.c \ + clnt_stream.c conv_time.c db_common.c debug_peer.c debug_process.c \ + defer.c deliver_completed.c deliver_flock.c deliver_pass.c \ +- deliver_request.c dict_ldap.c dict_mysql.c dict_pgsql.c \ ++ deliver_request.c dict_ldap.c dict_pgsql.c \ + dict_proxy.c dict_sqlite.c domain_list.c dot_lockfile.c dot_lockfile_as.c \ + dsb_scan.c dsn.c dsn_buf.c dsn_mask.c dsn_print.c dsn_util.c \ + ehlo_mask.c ext_prop.c file_id.c flush_clnt.c header_opts.c \ +@@ -78,7 +78,7 @@ + # MAP_OBJ is for maps that may be dynamically loaded with dynamicmaps.cf. + # When hard-linking these maps, makedefs sets NON_PLUGIN_MAP_OBJ=$(MAP_OBJ), + # otherwise it sets the PLUGIN_* macros. +-MAP_OBJ = dict_ldap.o dict_mysql.o dict_pgsql.o dict_sqlite.o mkmap_cdb.o \ ++MAP_OBJ = dict_ldap.o dict_pgsql.o dict_sqlite.o mkmap_cdb.o \ + mkmap_lmdb.o mkmap_sdbm.o + HDRS = abounce.h anvil_clnt.h been_here.h bounce.h bounce_log.h \ + canon_addr.h cfg_parser.h cleanup_user.h clnt_stream.h config.h \ +@@ -130,7 +130,7 @@ + LIBS = ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX) + LIB_DIR = ../../lib + INC_DIR = ../../include +-PLUGIN_MAP_SO = $(LIB_PREFIX)ldap$(LIB_SUFFIX) $(LIB_PREFIX)mysql$(LIB_SUFFIX) \ ++PLUGIN_MAP_SO = $(LIB_PREFIX)ldap$(LIB_SUFFIX) \ + $(LIB_PREFIX)pgsql$(LIB_SUFFIX) $(LIB_PREFIX)sqlite$(LIB_SUFFIX) \ + $(LIB_PREFIX)lmdb$(LIB_SUFFIX) $(LIB_PREFIX)cdb$(LIB_SUFFIX) \ + $(LIB_PREFIX)sdbm$(LIB_SUFFIX) +@@ -161,9 +161,6 @@ + $(LIB_PREFIX)ldap$(LIB_SUFFIX): dict_ldap.o + $(PLUGIN_LD) $(SHLIB_RPATH) -o $@ dict_ldap.o $(AUXLIBS_LDAP) + +-$(LIB_PREFIX)mysql$(LIB_SUFFIX): dict_mysql.o +- $(PLUGIN_LD) $(SHLIB_RPATH) -o $@ dict_mysql.o $(AUXLIBS_MYSQL) +- + $(LIB_PREFIX)pgsql$(LIB_SUFFIX): dict_pgsql.o + $(PLUGIN_LD) $(SHLIB_RPATH) -o $@ dict_pgsql.o $(AUXLIBS_PGSQL) + +@@ -1142,27 +1139,6 @@ + dict_memcache.o: dict_memcache.h + dict_memcache.o: memcache_proto.h + dict_memcache.o: string_list.h +-dict_mysql.o: ../../include/argv.h +-dict_mysql.o: ../../include/check_arg.h +-dict_mysql.o: ../../include/dict.h +-dict_mysql.o: ../../include/events.h +-dict_mysql.o: ../../include/find_inet.h +-dict_mysql.o: ../../include/match_list.h +-dict_mysql.o: ../../include/msg.h +-dict_mysql.o: ../../include/myflock.h +-dict_mysql.o: ../../include/mymalloc.h +-dict_mysql.o: ../../include/myrand.h +-dict_mysql.o: ../../include/split_at.h +-dict_mysql.o: ../../include/stringops.h +-dict_mysql.o: ../../include/sys_defs.h +-dict_mysql.o: ../../include/vbuf.h +-dict_mysql.o: ../../include/vstream.h +-dict_mysql.o: ../../include/vstring.h +-dict_mysql.o: cfg_parser.h +-dict_mysql.o: db_common.h +-dict_mysql.o: dict_mysql.c +-dict_mysql.o: dict_mysql.h +-dict_mysql.o: string_list.h + dict_pgsql.o: ../../include/argv.h + dict_pgsql.o: ../../include/check_arg.h + dict_pgsql.o: ../../include/dict.h -- cgit v1.2.3-70-g09d2