[pacman-dev] [PATCH 1/2] Remove Darwin support
Signed-off-by: Allan McRae <allan@archlinux.org> --- configure.ac | 16 ---------------- etc/Makefile.am | 3 --- etc/makepkg.conf.in | 6 +++--- lib/libalpm/Makefile.am | 4 ---- 4 files changed, 3 insertions(+), 26 deletions(-) diff --git a/configure.ac b/configure.ac index 7fe696a..434e2ba 100644 --- a/configure.ac +++ b/configure.ac @@ -295,9 +295,6 @@ GCC_GNU89_INLINE_CC INODECMD="stat -c '%i %n'" SIZECMD="stat -c %s" SEDINPLACE="sed -i" -STRIP_BINARIES="--strip-all" -STRIP_SHARED="--strip-unneeded" -STRIP_STATIC="--strip-debug" case "${host_os}" in *bsd*) INODECMD="stat -f '%i %n'" @@ -308,26 +305,13 @@ case "${host_os}" in host_os_cygwin=yes AC_DEFINE([CYGWIN], [1], [Define if host OS is cygwin]) ;; - darwin*) - host_os_darwin=yes - INODECMD="/usr/bin/stat -f '%i %n'" - SIZECMD="/usr/bin/stat -f %z" - SEDINPLACE="/usr/bin/sed -i ''" - STRIP_BINARIES="" - STRIP_SHARED="-S" - STRIP_STATIC="-S" - ;; esac AM_CONDITIONAL([CYGWIN], test "x$host_os_cygwin" = "xyes") -AM_CONDITIONAL([DARWIN], test "x$host_os_darwin" = "xyes") AC_PATH_PROGS([DUPATH], [du], [du], [/usr/bin$PATH_SEPARATOR/bin] ) AC_SUBST(INODECMD) AC_SUBST(SIZECMD) AC_SUBST(SEDINPLACE) -AC_SUBST(STRIP_BINARIES) -AC_SUBST(STRIP_SHARED) -AC_SUBST(STRIP_STATIC) # Variables plugged into makepkg.conf CARCH="${host%%-*}" diff --git a/etc/Makefile.am b/etc/Makefile.am index 58a80bd..2f3b047 100644 --- a/etc/Makefile.am +++ b/etc/Makefile.am @@ -13,9 +13,6 @@ edit = sed \ -e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \ -e 's|@PKGEXT[@]|$(PKGEXT)|g' \ -e 's|@SRCEXT[@]|$(SRCEXT)|g' \ - -e 's|@STRIP_BINARIES[@]|$(STRIP_BINARIES)|g' \ - -e 's|@STRIP_SHARED[@]|$(STRIP_SHARED)|g' \ - -e 's|@STRIP_STATIC[@]|$(STRIP_STATIC)|g' \ -e 's|@CARCH[@]|$(CARCH)|g' \ -e 's|@CHOST[@]|$(CHOST)|g' \ -e 's|@ARCHSWITCH[@]|$(ARCHSWITCH)|g' \ diff --git a/etc/makepkg.conf.in b/etc/makepkg.conf.in index dcec6f5..61e9a71 100644 --- a/etc/makepkg.conf.in +++ b/etc/makepkg.conf.in @@ -78,11 +78,11 @@ OPTIONS=(strip docs libtool emptydirs zipman purge !upx) #-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512 INTEGRITY_CHECK=(md5) #-- Options to be used when stripping binaries. See `man strip' for details. -STRIP_BINARIES="@STRIP_BINARIES@" +STRIP_BINARIES="--strip-all" #-- Options to be used when stripping shared libraries. See `man strip' for details. -STRIP_SHARED="@STRIP_SHARED@" +STRIP_SHARED="--strip-unneeded" #-- Options to be used when stripping static libraries. See `man strip' for details. -STRIP_STATIC="@STRIP_STATIC@" +STRIP_STATIC="--strip-debug" #-- Manual (man and info) directories to compress (if zipman is specified) MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info}) #-- Doc directories to remove (if !docs is specified) diff --git a/lib/libalpm/Makefile.am b/lib/libalpm/Makefile.am index 911e52b..9529526 100644 --- a/lib/libalpm/Makefile.am +++ b/lib/libalpm/Makefile.am @@ -13,12 +13,8 @@ AM_CPPFLAGS = \ AM_CFLAGS = -pedantic -D_GNU_SOURCE $(WARNING_CFLAGS) if ENABLE_VISIBILITY_CC -if DARWIN -AM_CFLAGS += -fvisibility=hidden -else AM_CFLAGS += -fvisibility=internal endif -endif if ENABLE_GNU89_INLINE_CC AM_CFLAGS += -fgnu89-inline endif -- 1.7.12.1
Signed-off-by: Allan McRae <allan@archlinux.org> --- configure.ac | 5 ----- src/pacman/pacman.c | 5 ++--- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index 434e2ba..40952ee 100644 --- a/configure.ac +++ b/configure.ac @@ -301,13 +301,8 @@ case "${host_os}" in SIZECMD="stat -f %z" SEDINPLACE="sed -i \"\"" ;; - cygwin*) - host_os_cygwin=yes - AC_DEFINE([CYGWIN], [1], [Define if host OS is cygwin]) - ;; esac -AM_CONDITIONAL([CYGWIN], test "x$host_os_cygwin" = "xyes") AC_PATH_PROGS([DUPATH], [du], [du], [/usr/bin$PATH_SEPARATOR/bin] ) AC_SUBST(INODECMD) AC_SUBST(SIZECMD) diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 478196e..0e60646 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -755,8 +755,7 @@ int main(int argc, char *argv[]) size_t i; struct sigaction new_action, old_action; const int signals[] = { SIGHUP, SIGINT, SIGTERM, SIGSEGV }; -#if defined(HAVE_GETEUID) && !defined(CYGWIN) - /* geteuid undefined in CYGWIN */ +#if defined(HAVE_GETEUID) uid_t myuid = geteuid(); #endif @@ -877,7 +876,7 @@ int main(int argc, char *argv[]) config->logmask &= ~ALPM_LOG_WARNING; } -#if defined(HAVE_GETEUID) && !defined(CYGWIN) +#if defined(HAVE_GETEUID) /* check if we have sufficient permission for the requested operation */ if(myuid > 0 && needs_root()) { pm_printf(ALPM_LOG_ERROR, _("you cannot perform this operation unless you are root.\n")); -- 1.7.12.1
participants (1)
-
Allan McRae