summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/apg/files')
-rw-r--r--app-admin/apg/files/apg-2.3.0b-cracklib.patch17
-rw-r--r--app-admin/apg/files/apg-2.3.0b_p20150129-cracklib.patch47
-rw-r--r--app-admin/apg/files/apg-glibc-2.4.patch11
3 files changed, 47 insertions, 28 deletions
diff --git a/app-admin/apg/files/apg-2.3.0b-cracklib.patch b/app-admin/apg/files/apg-2.3.0b-cracklib.patch
deleted file mode 100644
index d297495b3211..000000000000
--- a/app-admin/apg/files/apg-2.3.0b-cracklib.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- a/Makefile 2003-08-07 09:40:39.000000000 -0600
-+++ b/Makefile 2004-10-14 07:16:17.288530686 -0600
-@@ -44,10 +44,10 @@
- # If you want to use cracklib for password quality check then you
- # must uncomment the folowing 4 lines (you must not do this for WIN32)
- #
--#CRACKLIB_DICTPATH = "/usr/local/lib/pw_dict"
--#STANDALONE_OPTIONS += -DAPG_USE_CRACKLIB '-DCRACKLIB_DICTPATH=${CRACKLIB_DICTPATH}' -I/usr/local/include -L/usr/local/lib
--#CLISERV_OPTIONS += -DAPG_USE_CRACKLIB '-DCRACKLIB_DICTPATH=${CRACKLIB_DICTPATH}' -I/usr/local/include -L/usr/local/lib
--#APG_CLIBS += -lcrack
-+CRACKLIB_DICTPATH = "/usr/lib/cracklib_dict"
-+STANDALONE_OPTIONS += -DAPG_USE_CRACKLIB '-DCRACKLIB_DICTPATH=${CRACKLIB_DICTPATH}'
-+CLISERV_OPTIONS += -DAPG_USE_CRACKLIB '-DCRACKLIB_DICTPATH=${CRACKLIB_DICTPATH}'
-+APG_CLIBS += -lcrack
-
- ##################################################################
- # Support for ANSI X9.17/SHA1 PRNG
diff --git a/app-admin/apg/files/apg-2.3.0b_p20150129-cracklib.patch b/app-admin/apg/files/apg-2.3.0b_p20150129-cracklib.patch
new file mode 100644
index 000000000000..b019f565e154
--- /dev/null
+++ b/app-admin/apg/files/apg-2.3.0b_p20150129-cracklib.patch
@@ -0,0 +1,47 @@
+commit 8c3976544af138aa5d8bc21aa5bc80ba91babc92
+Author: Andrew Savchenko <bircoph@gentoo.org>
+Date: Wed Sep 30 17:12:18 2020 +0300
+
+ add cracklib support to the new build system
+
+diff --git a/Makefile.am b/Makefile.am
+index 42068bf..3871295 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -19,9 +19,15 @@ common_apg_sources = \
+ convert.c
+
+ apg_SOURCES = $(common_apg_sources)
++if HAVE_CRACKLIB
++apg_LDFLAGS = -lcrack
++apg_CPPFLAGS = -DAPG_USE_CRACKLIB -DCRACKLIB_DICTPATH=\"/usr/lib/cracklib_dict\"
++endif
+
+ apgd_SOURCES = $(common_apg_sources)
+ apgd_CPPFLAGS = -DCLISERV
++apgd_CPPFLAGS += $(apg_CPPFLAGS)
++apgd_LDFLAGS = $(apg_LDFLAGS)
+
+ apgbfm_SOURCES = apgbfm.c bloom.c sha/sha.c errors.c getopt.c convert.c
+ apgbfm_CPPFLAGS = -DAPGBFM
+diff --git a/configure.ac b/configure.ac
+index d8fd056..75483d1 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -43,8 +43,16 @@ AC_SEARCH_LIBS([strerror], [cposix])
+ AC_CHECK_FUNCS([getpass gettimeofday inet_ntoa memset strchr strerror])
+ AC_CHECK_FUNCS([crypt])
+
++AC_ARG_WITH([cracklib],
++ AC_HELP_STRING([--with-cracklib], [Use cracklib for strong password checking [default=no]]))
++AS_IF([test "x$with_cracklib" = "xyes"],[
++ AC_SEARCH_LIBS([FascistCheck],[crack],[HAVE_CRACKLIB=1],
++ AC_MSG_ERROR([cracklib requested but not found]))
++])
++
+ LT_PREREQ([2.4.2])
+ LT_INIT([win32-dll disable-static pic-only])
+
++AM_CONDITIONAL([HAVE_CRACKLIB],[test "x$HAVE_CRACKLIB" != "x"])
+ AC_CONFIG_FILES([Makefile])
+ AC_OUTPUT
diff --git a/app-admin/apg/files/apg-glibc-2.4.patch b/app-admin/apg/files/apg-glibc-2.4.patch
deleted file mode 100644
index 43b5874fa2b6..000000000000
--- a/app-admin/apg/files/apg-glibc-2.4.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/restrict.h 2006-03-26 03:33:50.168661936 +0400
-+++ b/restrict.h 2006-03-26 03:34:10.427582112 +0400
-@@ -33,6 +33,8 @@
- #ifndef APG_RESTRICT_H
- #define APG_RESTRICT_H 1
-
-+#define uint32_t int
-+
- #if defined(APG_USE_CRACKLIB)
- #include <packer.h>
- #endif