From 6bde5bd7302d9eeca63d55c8b57a6c544e56fe8c Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 8 Oct 2011 11:42:06 +0200 Subject: push pacemaker stuff in a usable state. --- package/Pacemaker-Python-GUI/Makefile | 47 +++++++++++++++++++ .../patches/patch-mgmt_daemon_mgmt_crm_c | 32 +++++++++++++ package/base-files/Makefile | 2 +- package/base-files/src/init | 1 + package/busybox/config/coreutils/Config.in | 2 +- package/cluster-glue/Makefile | 5 +- package/corosync/Makefile | 7 +-- package/corosync/patches/patch-Makefile_in | 11 ----- .../corosync/patches/patch-tools_corosync-keygen_c | 4 +- package/libxslt/Makefile | 5 +- package/openais/files/openais.init | 7 ++- package/pacemaker/Makefile | 23 ++++++--- package/pacemaker/files/pacemaker.postinst | 8 ++++ package/pacemaker/patches/patch-configure | 4 +- package/pacemaker/patches/patch-configure.orig | 54 ---------------------- package/pam/Makefile | 32 +++++++++++++ package/pam/patches/patch-Makefile_in | 24 ++++++++++ package/pam/patches/patch-conf_Makefile_in | 11 +++++ package/resource-agents/Makefile | 8 +++- package/resource-agents/patches/patch-configure | 11 +++++ 20 files changed, 210 insertions(+), 88 deletions(-) create mode 100644 package/Pacemaker-Python-GUI/Makefile create mode 100644 package/Pacemaker-Python-GUI/patches/patch-mgmt_daemon_mgmt_crm_c delete mode 100644 package/corosync/patches/patch-Makefile_in create mode 100644 package/pacemaker/files/pacemaker.postinst delete mode 100644 package/pacemaker/patches/patch-configure.orig create mode 100644 package/pam/Makefile create mode 100644 package/pam/patches/patch-Makefile_in create mode 100644 package/pam/patches/patch-conf_Makefile_in create mode 100644 package/resource-agents/patches/patch-configure diff --git a/package/Pacemaker-Python-GUI/Makefile b/package/Pacemaker-Python-GUI/Makefile new file mode 100644 index 000000000..616fa9360 --- /dev/null +++ b/package/Pacemaker-Python-GUI/Makefile @@ -0,0 +1,47 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= Pacemaker-Python-GUI +PKG_VERSION:= 2.1.0 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 22379f78409cec9df10c25983783ef6c +PKG_DESCR:= Pacemaker GUI +PKG_SECTION:= ha +PKG_BUILDDEP:= pacemaker gnutls pam +PKG_URL:= http://hg.clusterlabs.org/pacemaker/pygui/ +PKG_SITES:= http://openadk.org/distfiles/ + +PKG_SUBPKGS:= PACEMAKER_PYTHON_GUI PACEMAKER_MGMTD +PKGSD_PACEMAKER_MGMTD:= Management daemon for Pacemaker GUI + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,PACEMAKER_PYTHON_GUI,pacemaker-python-gui,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +$(eval $(call PKG_template,PACEMAKER_MGMTD,pacemaker-mgmtd,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) + +CONFIGURE_ARGS+= --with-initdir=/etc/init.d \ + --with-ocf-root=/usr/lib/ocf \ + --disable-fatal-warnings +TARGET_CFLAGS+= -I$(STAGING_DIR)/usr/include/python2.7 \ + -I$(STAGING_DIR)/usr/include/pacemaker \ + -I$(STAGING_DIR)/usr/include/heartbeat + +pacemaker-python-gui-install: + $(INSTALL_DIR) $(IDIR_PACEMAKER_PYTHON_GUI)/usr/bin + $(INSTALL_DIR) $(IDIR_PACEMAKER_PYTHON_GUI)/usr/lib/heartbeat-gui + $(CP) $(WRKINST)/usr/lib/heartbeat-gui/* \ + $(IDIR_PACEMAKER_PYTHON_GUI)/usr/lib/heartbeat-gui + $(INSTALL_BIN) $(WRKINST)/usr/bin/hb_gui \ + $(IDIR_PACEMAKER_PYTHON_GUI)/usr/bin + +pacemaker-mgmtd-install: + $(INSTALL_DIR) $(IDIR_PACEMAKER_MGMTD)/usr/lib + $(CP) $(WRKINST)/usr/lib/libhbmgmt*so* \ + $(IDIR_PACEMAKER_MGMTD)/usr/lib + $(INSTALL_DIR) $(IDIR_PACEMAKER_MGMTD)/usr/lib/heartbeat + $(INSTALL_BIN) $(WRKINST)/usr/lib/heartbeat/mgmtd \ + $(IDIR_PACEMAKER_MGMTD)/usr/lib/heartbeat + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/Pacemaker-Python-GUI/patches/patch-mgmt_daemon_mgmt_crm_c b/package/Pacemaker-Python-GUI/patches/patch-mgmt_daemon_mgmt_crm_c new file mode 100644 index 000000000..1882093d5 --- /dev/null +++ b/package/Pacemaker-Python-GUI/patches/patch-mgmt_daemon_mgmt_crm_c @@ -0,0 +1,32 @@ +--- Pacemaker-Python-GUI-2.1.0.orig/mgmt/daemon/mgmt_crm.c 2011-08-03 13:54:23.000000000 +0200 ++++ Pacemaker-Python-GUI-2.1.0/mgmt/daemon/mgmt_crm.c 2011-10-07 16:15:59.000000000 +0200 +@@ -1393,7 +1393,7 @@ on_cleanup_rsc(char* argv[], int argc) + argv[1], cib_error2string(rc)); + } else { + buffer = crm_concat("fail-count", argv[2], '-'); +- delete_attr(cib_conn, cib_sync_call, XML_CIB_TAG_STATUS, dest_node, NULL, NULL, ++ delete_attr(cib_conn, cib_sync_call, XML_CIB_TAG_STATUS, dest_node, NULL, + NULL, buffer, NULL, FALSE); + crm_free(dest_node); + crm_free(buffer); +@@ -1403,7 +1403,7 @@ on_cleanup_rsc(char* argv[], int argc) + sleep(2); /* wait for the refresh */ + now_s = crm_itoa(now); + update_attr(cib_conn, cib_sync_call, +- XML_CIB_TAG_CRMCONFIG, NULL, NULL, NULL, NULL, "last-lrm-refresh", now_s, FALSE); ++ XML_CIB_TAG_CRMCONFIG, NULL, NULL, NULL, "last-lrm-refresh", now_s, FALSE); + crm_free(now_s); + + crmd_channel->ops->destroy(crmd_channel); +@@ -1509,9 +1509,11 @@ on_get_rsc_status(char* argv[], int argc + strncat(buf, " (orphaned)", sizeof(buf)-strlen(buf)-1); + } + ++ /* + if(is_set(rsc->flags, pe_rsc_failure_ignored)) { + strncat(buf, " (failure ignored)", sizeof(buf)-strlen(buf)-1); + } ++ */ + + ret = mgmt_msg_append(ret, buf); + break; diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 27ecdaa7c..fa1fecd86 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/mk/rootfs.mk PKG_NAME:= base-files PKG_VERSION:= 1.0 -PKG_RELEASE:= 47 +PKG_RELEASE:= 48 PKG_SECTION:= base PKG_DESCR:= basic files and scripts diff --git a/package/base-files/src/init b/package/base-files/src/init index a9564011d..c57149fe3 100755 --- a/package/base-files/src/init +++ b/package/base-files/src/init @@ -12,6 +12,7 @@ mount -o nosuid,nodev,noexec -t sysfs sysfs /sys mount -o remount,nosuid,size=128k,mode=0755 -t tmpfs mdev /dev [ -d /dev/pts ] || mkdir /dev/pts [ -d /dev/shm ] || mkdir /dev/shm +mount -o nosuid,noexec -t tmpfs tmpfs /dev/shm mount -o nosuid,noexec -t devpts devpts /dev/pts exec 0<>/dev/console >&0 2>&0 echo >/dev/mdev.seq diff --git a/package/busybox/config/coreutils/Config.in b/package/busybox/config/coreutils/Config.in index 9c55d74aa..1b2d9d5fd 100644 --- a/package/busybox/config/coreutils/Config.in +++ b/package/busybox/config/coreutils/Config.in @@ -776,7 +776,7 @@ config BUSYBOX_TRUE config BUSYBOX_TTY bool "tty" - default n + default y help tty is used to print the name of the current terminal to standard output. diff --git a/package/cluster-glue/Makefile b/package/cluster-glue/Makefile index 140526ebc..170ae3a08 100644 --- a/package/cluster-glue/Makefile +++ b/package/cluster-glue/Makefile @@ -14,7 +14,6 @@ PKG_URL:= http://www.linux-ha.org/wiki/Cluster_Glue PKG_SITES:= http://openadk.org/distfiles/ PKG_CFLINE_CLUSTER_GLUE:= depends on ADK_TARGET_LIB_GLIBC || ADK_TARGET_LIB_EGLIBC -PKG_HOST_DEPENDS:= !darwin PKG_ARCH_DEPENDS:= x86 x86_64 include $(TOPDIR)/mk/package.mk @@ -28,8 +27,10 @@ CONFIGURE_ARGS+= --disable-bundled-ltdl \ --enable-fatal-warnings=no cluster-glue-install: - $(INSTALL_DIR) $(IDIR_CLUSTER_GLUE)/usr/lib + $(INSTALL_DIR) $(IDIR_CLUSTER_GLUE)/usr/lib/heartbeat $(CP) $(WRKINST)/usr/lib/*.so* \ $(IDIR_CLUSTER_GLUE)/usr/lib + $(CP) $(WRKINST)/usr/lib/heartbeat/* \ + $(IDIR_CLUSTER_GLUE)/usr/lib/heartbeat include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/corosync/Makefile b/package/corosync/Makefile index 378fd618a..eb5ae8197 100644 --- a/package/corosync/Makefile +++ b/package/corosync/Makefile @@ -4,13 +4,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:= corosync -PKG_VERSION:= 1.3.1 +PKG_VERSION:= 1.4.1 PKG_RELEASE:= 1 -PKG_MD5SUM:= c58459a009a3a9d0b9c00e276a190d90 +PKG_MD5SUM:= 66231146af210637393748add091021d PKG_DESCR:= Cluster Engine PKG_SECTION:= ha +PKG_DEPENDS:= cluster-glue PKG_URL:= http://www.corosync.org/ -PKG_SITES:= http://openadk.org/distfiles/ +PKG_SITES:= ftp://ftp:downloads@ftp.corosync.org/downloads/corosync-1.4.1/ PKG_CFLINE_COROSYNC:= select ADK_KERNEL_IP_MULTICAST diff --git a/package/corosync/patches/patch-Makefile_in b/package/corosync/patches/patch-Makefile_in deleted file mode 100644 index 4fc1ef74a..000000000 --- a/package/corosync/patches/patch-Makefile_in +++ /dev/null @@ -1,11 +0,0 @@ ---- corosync-1.3.1.orig/Makefile.in 2011-04-25 04:39:52.000000000 +0200 -+++ corosync-1.3.1/Makefile.in 2011-06-25 21:58:51.012672595 +0200 -@@ -320,7 +320,7 @@ corosysconf_DATA = conf/corosync.conf.ex - conf/corosync.conf.example.udpu - - SUBDIRS = include lcr lib exec services tools test pkgconfig \ -- man init -+ init - - RPMBUILDOPTS = --define "_sourcedir $(abs_builddir)" \ - --define "_specdir $(abs_builddir)" \ diff --git a/package/corosync/patches/patch-tools_corosync-keygen_c b/package/corosync/patches/patch-tools_corosync-keygen_c index 6e147930c..eecf92026 100644 --- a/package/corosync/patches/patch-tools_corosync-keygen_c +++ b/package/corosync/patches/patch-tools_corosync-keygen_c @@ -1,5 +1,5 @@ ---- corosync-1.3.1.orig/tools/corosync-keygen.c 2011-04-25 04:37:50.000000000 +0200 -+++ corosync-1.3.1/tools/corosync-keygen.c 2011-05-26 07:27:22.000000000 +0200 +--- corosync-1.4.1.orig/tools/corosync-keygen.c 2011-07-26 10:08:43.000000000 +0200 ++++ corosync-1.4.1/tools/corosync-keygen.c 2011-10-04 21:03:05.000000000 +0200 @@ -65,11 +65,11 @@ int main (void) { } } diff --git a/package/libxslt/Makefile b/package/libxslt/Makefile index b82a80281..b4306c66d 100644 --- a/package/libxslt/Makefile +++ b/package/libxslt/Makefile @@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk PKG_NAME:= libxslt PKG_VERSION:= 1.1.24 -PKG_RELEASE:= 1 +PKG_RELEASE:= 2 PKG_MD5SUM:= e83ec5d27fc4c10c6f612879bea9a153 PKG_DESCR:= XSLT Library PKG_SECTION:= libs @@ -42,7 +42,8 @@ xsltproc-install: libxslt-install: ${INSTALL_DIR} ${IDIR_LIBXSLT}/usr/lib - ${CP} ${WRKINST}/usr/lib/lib?xslt.so* ${IDIR_LIBXSLT}/usr/lib + ${CP} ${WRKINST}/usr/lib/libxslt.so* ${IDIR_LIBXSLT}/usr/lib + ${CP} ${WRKINST}/usr/lib/libexslt.so* ${IDIR_LIBXSLT}/usr/lib libxslt-dev-install: ${INSTALL_DIR} ${IDIR_LIBXSLT_DEV}/usr/include diff --git a/package/openais/files/openais.init b/package/openais/files/openais.init index f36121c7a..25b2d8974 100644 --- a/package/openais/files/openais.init +++ b/package/openais/files/openais.init @@ -10,13 +10,16 @@ autostart) exec sh $0 start ;; start) - mount -t tmpfs -o size=4M tmpfs /dev/shm [ -d /var/lib/corosync ] || mkdir -p /var/lib/corosync + mkdir -p /var/lib/heartbeat/crm + chown hacluster:haclient /var/lib/heartbeat/crm + chmod 775 /var/lib/heartbeat/crm + mkdir -p /var/lib/pengine + chown hacluster /var/lib/pengine /usr/sbin/aisexec ;; stop) kill $(pgrep -f corosync) - umount /dev/shm ;; restart) sh $0 stop diff --git a/package/pacemaker/Makefile b/package/pacemaker/Makefile index 82b217f17..25dc896ff 100644 --- a/package/pacemaker/Makefile +++ b/package/pacemaker/Makefile @@ -9,12 +9,13 @@ PKG_RELEASE:= 1 PKG_MD5SUM:= bfe2127d31e5244d0106a5c290fd0dc2 PKG_DESCR:= scalable High-Availability cluster resource manager PKG_SECTION:= ha -PKG_DEPENDS:= python2 +PKG_BUILDDEP:= resource-agents cluster-glue pam gnutls +PKG_DEPENDS:= python2 python2-readline python2-bzip2 cluster-glue +PKG_DEPENDS+= bash resource-agents pam libgnutls glib libxslt libxml2 PKG_URL:= http://www.clusterlabs.org/ PKG_SITES:= http://openadk.org/distfiles/ PKG_CFLINE_PACEMAKER:= depends on ADK_TARGET_LIB_GLIBC || ADK_TARGET_LIB_EGLIBC -PKG_HOST_DEPENDS:= !darwin PKG_ARCH_DEPENDS:= x86 include $(TOPDIR)/mk/package.mk @@ -24,15 +25,25 @@ $(eval $(call PKG_template,PACEMAKER,pacemaker,$(PKG_VERSION)-${PKG_RELEASE},${P # disable honour cflags stuff XAKE_FLAGS+= GCC_HONOUR_COPTS=s -CONFIGURE_ARGS+= --includedir=$(STAGING_TARGET_DIR)/usr/include \ - --disable-fatal-warnings +CONFIGURE_ARGS+= --disable-fatal-warnings CONFIGURE_ENV+= ac_cv_path_HELP2MAN='' -CFLAGS_FOR_BUILD+= -I$(STAGING_TARGET_DIR)/usr/include/heartbeat +CFLAGS_FOR_BUILD+= -I$(STAGING_DIR)/usr/include/heartbeat + +pre-configure: + $(SED) "s#@@STAGING_DIR@@#$(STAGING_DIR)#" $(WRKBUILD)/configure pacemaker-install: - $(INSTALL_DIR) $(IDIR_PACEMAKER)/usr/lib + $(INSTALL_DIR) $(IDIR_PACEMAKER)/usr/lib/heartbeat + $(INSTALL_DIR) $(IDIR_PACEMAKER)/usr/lib/ocf $(CP) $(WRKINST)/usr/lib/lib*.so* \ $(IDIR_PACEMAKER)/usr/lib + $(CP) $(WRKINST)/usr/lib/heartbeat/* \ + $(IDIR_PACEMAKER)/usr/lib/heartbeat + $(CP) $(WRKINST)/usr/lib/ocf/* \ + $(IDIR_PACEMAKER)/usr/lib/ocf + $(INSTALL_DIR) $(IDIR_PACEMAKER)/usr/share/pacemaker + $(CP) $(WRKINST)/usr/share/pacemaker/* \ + $(IDIR_PACEMAKER)/usr/share/pacemaker $(INSTALL_DIR) $(IDIR_PACEMAKER)/usr/sbin $(CP) $(WRKINST)/usr/sbin/* \ $(IDIR_PACEMAKER)/usr/sbin diff --git a/package/pacemaker/files/pacemaker.postinst b/package/pacemaker/files/pacemaker.postinst new file mode 100644 index 000000000..acda216de --- /dev/null +++ b/package/pacemaker/files/pacemaker.postinst @@ -0,0 +1,8 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh + +gid=$(get_next_gid) +gid2=$(get_next_gid) +add_user hacluster $(get_next_uid) $gid /tmp +add_group hacluster $gid +add_group haclient $gid2 diff --git a/package/pacemaker/patches/patch-configure b/package/pacemaker/patches/patch-configure index 5206c0b3b..320b06924 100644 --- a/package/pacemaker/patches/patch-configure +++ b/package/pacemaker/patches/patch-configure @@ -1,5 +1,5 @@ --- pacemaker-1.0.11.orig/configure 2011-05-24 17:00:37.000000000 +0200 -+++ pacemaker-1.0.11/configure 2011-06-25 22:21:57.912681957 +0200 ++++ pacemaker-1.0.11/configure 2011-10-07 12:41:11.000000000 +0200 @@ -12484,7 +12484,7 @@ $as_echo_n "checking for $2 in $1... " > printf "#include \n" > ${Cfile}.c printf "#include <%s>\n" $1 >> ${Cfile}.c @@ -49,7 +49,7 @@ -esac - -CFLAGS="$CFLAGS -I${prefix}/include/heartbeat" -+CFLAGS="$CFLAGS -I${includedir}/heartbeat" ++CFLAGS="$CFLAGS -I@@STAGING_DIR@@/usr/include/heartbeat" diff --git a/package/pacemaker/patches/patch-configure.orig b/package/pacemaker/patches/patch-configure.orig deleted file mode 100644 index a3eca9a9d..000000000 --- a/package/pacemaker/patches/patch-configure.orig +++ /dev/null @@ -1,54 +0,0 @@ ---- pacemaker-1.0.11.orig/configure 2011-05-24 17:00:37.000000000 +0200 -+++ pacemaker-1.0.11/configure 2011-05-24 17:39:43.000000000 +0200 -@@ -12484,7 +12484,7 @@ $as_echo_n "checking for $2 in $1... " > - printf "#include \n" > ${Cfile}.c - printf "#include <%s>\n" $1 >> ${Cfile}.c - printf "int main(int argc, char **argv) { printf(\"%%s\", %s); return 0; }\n" $2 >> ${Cfile}.c -- $CC $CFLAGS ${Cfile}.c -o ${Cfile} -+ $CC_FOR_BUILD $CFLAGS_FOR_BUILD ${Cfile}.c -o ${Cfile} - value=`${Cfile}` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $value" >&5 - $as_echo "$value" >&6; } -@@ -12713,33 +12713,11 @@ $as_echo "$as_me: WARNING: $j directory - done - - --case "$host_os" in --*bsd*) LIBS="-L/usr/local/lib" -- CPPFLAGS="$CPPFLAGS -I/usr/local/include" -- INIT_EXT=".sh" -- ;; --*solaris*) -- ;; --*linux*) -- - cat >>confdefs.h <<_ACEOF - #define ON_LINUX 1 - _ACEOF - -- CFLAGS="$CFLAGS -I${prefix}/include" -- ;; --darwin*) -- --cat >>confdefs.h <<_ACEOF --#define ON_DARWIN 1 --_ACEOF -- -- LIBS="$LIBS -L${prefix}/lib" -- CFLAGS="$CFLAGS -I${prefix}/include" -- ;; --esac -- --CFLAGS="$CFLAGS -I${prefix}/include/heartbeat" -+CFLAGS="$CFLAGS -I${includedir}/heartbeat" - - - -@@ -17159,7 +17137,6 @@ else - - # We had to eliminate -Wnested-externs because of libtool changes - EXTRA_FLAGS="-fgnu89-inline -- -fstack-protector-all - -Wall - -Waggregate-return - -Wbad-function-cast diff --git a/package/pam/Makefile b/package/pam/Makefile new file mode 100644 index 000000000..a9381495e --- /dev/null +++ b/package/pam/Makefile @@ -0,0 +1,32 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= pam +PKG_VERSION:= 1.1.4 +PKG_RELEASE:= 1 +PKG_MD5SUM:= ff8f3c4382b78ac211e11bcd56ab17bf +PKG_DESCR:= Pluggable Authentication Modules +PKG_BUILDDEP:= flex +PKG_SECTION:= misc +PKG_SITES:= http://openadk.org/distfiles/ + +DISTFILES:= Linux-PAM-$(PKG_VERSION).tar.gz +WRKDIST= ${WRKDIR}/Linux-PAM-${PKG_VERSION} + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,PAM,pam,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) + +pam-install: + $(INSTALL_DIR) $(IDIR_PAM)/etc/security + $(CP) $(WRKINST)/etc/security/* $(IDIR_PAM)/etc/security + $(INSTALL_DIR) $(IDIR_PAM)/lib/security + $(CP) $(WRKINST)/lib/libpam*.so* $(IDIR_PAM)/lib + $(CP) $(WRKINST)/lib/security/*.so* $(IDIR_PAM)/lib/security + $(CP) $(WRKBUILD)/conf/pam.conf $(IDIR_PAM)/etc + # /lib is not automatically installed to staging area + $(CP) $(WRKINST)/lib/libpam*.so* $(STAGING_DIR)/usr/lib + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/pam/patches/patch-Makefile_in b/package/pam/patches/patch-Makefile_in new file mode 100644 index 000000000..12574da06 --- /dev/null +++ b/package/pam/patches/patch-Makefile_in @@ -0,0 +1,24 @@ +--- Linux-PAM-1.1.4.orig/Makefile.in 2011-06-24 12:48:16.000000000 +0200 ++++ Linux-PAM-1.1.4/Makefile.in 2011-10-07 11:42:21.000000000 +0200 +@@ -75,8 +75,8 @@ RECURSIVE_CLEAN_TARGETS = mostlyclean-re + distclean-recursive maintainer-clean-recursive + ETAGS = etags + CTAGS = ctags +-DIST_SUBDIRS = libpam tests libpamc libpam_misc modules po conf doc \ +- examples xtests ++DIST_SUBDIRS = libpam tests libpamc libpam_misc modules po conf \ ++ examples + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + distdir = $(PACKAGE)-$(VERSION) + top_distdir = $(distdir) +@@ -258,8 +258,8 @@ top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + AUTOMAKE_OPTIONS = 1.9 gnu dist-bzip2 check-news +-@STATIC_MODULES_FALSE@SUBDIRS = libpam tests libpamc libpam_misc modules po conf doc examples xtests +-@STATIC_MODULES_TRUE@SUBDIRS = modules libpam libpamc libpam_misc tests po conf doc examples xtests ++@STATIC_MODULES_FALSE@SUBDIRS = libpam tests libpamc libpam_misc modules po conf examples ++@STATIC_MODULES_TRUE@SUBDIRS = modules libpam libpamc libpam_misc tests po conf examples + CLEANFILES = *~ + M4_FILES = m4/gettext.m4 m4/iconv.m4 m4/intlmacosx.m4 \ + m4/japhar_grep_cflags.m4 m4/jh_path_xml_catalog.m4 \ diff --git a/package/pam/patches/patch-conf_Makefile_in b/package/pam/patches/patch-conf_Makefile_in new file mode 100644 index 000000000..b4a0d7afb --- /dev/null +++ b/package/pam/patches/patch-conf_Makefile_in @@ -0,0 +1,11 @@ +--- Linux-PAM-1.1.4.orig/conf/Makefile.in 2011-06-24 12:48:02.000000000 +0200 ++++ Linux-PAM-1.1.4/conf/Makefile.in 2011-10-07 11:32:37.000000000 +0200 +@@ -236,7 +236,7 @@ target_alias = @target_alias@ + top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ +-SUBDIRS = pam_conv1 ++SUBDIRS = + CLEANFILES = *~ + EXTRA_DIST = install_conf md5itall pam.conf + all: all-recursive diff --git a/package/resource-agents/Makefile b/package/resource-agents/Makefile index 6611a579c..657529326 100644 --- a/package/resource-agents/Makefile +++ b/package/resource-agents/Makefile @@ -5,24 +5,28 @@ include $(TOPDIR)/rules.mk PKG_NAME:= resource-agents PKG_VERSION:= 3.9.0 -PKG_RELEASE:= 1 +PKG_RELEASE:= 2 PKG_MD5SUM:= b5d0c178082ff186c36ab145b5bbf5df PKG_DESCR:= Resource agents for clusters PKG_SECTION:= ha +PKG_BUILDDEP:= glib cluster-glue PKG_URL:= https://github.com/ClusterLabs/resource-agents PKG_SITES:= http://openadk.org/distfiles/ PKG_CFLINE_RESOURCE_AGENTS:= depends on ADK_TARGET_LIB_GLIBC || ADK_TARGET_LIB_EGLIBC -PKG_HOST_DEPENDS:= !darwin PKG_ARCH_DEPENDS:= x86 include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,RESOURCE_AGENTS,resource-agents,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIGURE_ARGS+= --with-ocf-root=/usr/lib/ocf + resource-agents-install: $(INSTALL_DIR) $(IDIR_RESOURCE_AGENTS)/usr/share/cluster $(CP) $(WRKINST)/usr/share/cluster/*.sh \ $(IDIR_RESOURCE_AGENTS)/usr/share/cluster + $(INSTALL_DIR) $(IDIR_RESOURCE_AGENTS)/usr/lib + $(CP) $(WRKINST)/usr/lib/* $(IDIR_RESOURCE_AGENTS)/usr/lib include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/resource-agents/patches/patch-configure b/package/resource-agents/patches/patch-configure new file mode 100644 index 000000000..62d1beba5 --- /dev/null +++ b/package/resource-agents/patches/patch-configure @@ -0,0 +1,11 @@ +--- resource-agents-3.9.0.orig/configure 2011-05-24 15:37:07.000000000 +0200 ++++ resource-agents-3.9.0/configure 2011-10-07 20:11:45.000000000 +0200 +@@ -6171,7 +6171,7 @@ $as_echo_n "checking for $2 in $1... " > + printf "#include \n" > ${Cfile}.c + printf "#include <%s>\n" $1 >> ${Cfile}.c + printf "int main(int argc, char **argv) { printf(\"%%s\", %s); return 0; }\n" $2 >> ${Cfile}.c +- $CC $CFLAGS ${Cfile}.c -o ${Cfile} ++ $CC_FOR_BUILD $CFLAGS_FOR_BUILD ${Cfile}.c -o ${Cfile} + value=`${Cfile}` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $value" >&5 + $as_echo "$value" >&6; } -- cgit v1.2.3 From 7f6d8cbed9b750aaae116f1d444d1f77469957e2 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 8 Oct 2011 22:15:26 +0200 Subject: fix cross-compile on Darwin --- package/gnutls/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/package/gnutls/Makefile b/package/gnutls/Makefile index c4c5e0cb1..40e93d15e 100644 --- a/package/gnutls/Makefile +++ b/package/gnutls/Makefile @@ -40,6 +40,7 @@ CONFIGURE_ARGS+= --without-libopencdk-prefix \ --without-libz-prefix \ --without-p11-kit \ --without-nettle-prefix +CONFIGURE_ENV+= ac_cv_prog_AR='$(TARGET_CROSS)ar' post-install: ${INSTALL_DIR} ${IDIR_LIBGNUTLS}/usr/lib -- cgit v1.2.3 From bbdeb66b02904db8f592b5de5164898054dc8a92 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 10 Oct 2011 13:08:03 +0200 Subject: update to latest upstream. my statvfs changes seems to be not compatible to normal behaviour --- package/xfsprogs/Makefile | 10 +- package/xfsprogs/patches/patch-configure | 380 +-------------------- package/xfsprogs/patches/patch-include_buildmacros | 11 + package/xfsprogs/patches/patch-libxfs_linux_c | 35 -- package/xfsprogs/patches/patch-ltmain_sh | 11 - 5 files changed, 33 insertions(+), 414 deletions(-) create mode 100644 package/xfsprogs/patches/patch-include_buildmacros delete mode 100644 package/xfsprogs/patches/patch-libxfs_linux_c delete mode 100644 package/xfsprogs/patches/patch-ltmain_sh diff --git a/package/xfsprogs/Makefile b/package/xfsprogs/Makefile index f22b8aec2..5ebc65d32 100644 --- a/package/xfsprogs/Makefile +++ b/package/xfsprogs/Makefile @@ -4,13 +4,13 @@ include ${TOPDIR}/rules.mk PKG_NAME:= xfsprogs -PKG_VERSION:= 3.1.4 +PKG_VERSION:= 3.1.5 PKG_RELEASE:= 1 -PKG_MD5SUM:= 74081975f148bcabcab26c4c3496ede9 +PKG_MD5SUM:= b1db37749e2b4149a0dd178abff956be PKG_DESCR:= Utilities for XFS filesystems PKG_SECTION:= fs -PKG_DEPENDS:= libuuid libpthread PKG_BUILDDEP:= e2fsprogs +PKG_DEPENDS:= libuuid libpthread PKG_URL:= http://oss.sgi.com/projects/xfs PKG_SITES:= ftp://oss.sgi.com/projects/xfs/cmd_tars/ \ ftp://oss.sgi.com/projects/xfs/previous/cmd_tars/ @@ -28,7 +28,7 @@ ALL_TARGET= do-install: ${INSTALL_DIR} ${IDIR_XFSPROGS}/usr/sbin - ${INSTALL_BIN} ${WRKBUILD}/mkfs/mkfs.xfs ${IDIR_XFSPROGS}/usr/sbin/ - ${INSTALL_BIN} ${WRKBUILD}/repair/xfs_repair ${IDIR_XFSPROGS}/usr/sbin/ + ${INSTALL_BIN} ${WRKBUILD}/mkfs/mkfs.xfs ${IDIR_XFSPROGS}/usr/sbin + ${INSTALL_BIN} ${WRKBUILD}/repair/xfs_repair ${IDIR_XFSPROGS}/usr/sbin include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/xfsprogs/patches/patch-configure b/package/xfsprogs/patches/patch-configure index ea30c4cdb..0eaf41253 100644 --- a/package/xfsprogs/patches/patch-configure +++ b/package/xfsprogs/patches/patch-configure @@ -1,366 +1,20 @@ ---- xfsprogs-3.1.4.orig/configure 2010-11-11 18:38:31.000000000 +0100 -+++ xfsprogs-3.1.4/configure 2011-02-14 20:26:03.000000000 +0100 -@@ -11214,11 +11214,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu - test -z "$INSTALL_GROUP" || pkg_group="$INSTALL_GROUP" +--- xfsprogs-3.1.5.orig/configure 2011-03-31 05:11:43.000000000 +0200 ++++ xfsprogs-3.1.5/configure 2011-10-09 18:15:57.858626068 +0200 +@@ -245,7 +245,7 @@ $0: the script under such a shell if you + fi + fi + fi +-SHELL=${CONFIG_SHELL-/bin/sh} ++SHELL=${CONFIG_SHELL-/bin/bash} + export SHELL + # Unset more variables known to interfere with behavior of common tools. + CLICOLOR_FORCE= GREP_OPTIONS= +@@ -6414,7 +6414,7 @@ fi + LIBTOOL_DEPS="$ltmain" + + # Always use our own libtool. +-LIBTOOL='$(SHELL) $(top_builddir)/libtool' ++LIBTOOL='$(CONFIG_SHELL) $(top_builddir)/libtool' -- pkg_distribution=`uname -s` -+ pkg_distribution=Linux - test -z "$DISTRIBUTION" || pkg_distribution="$DISTRIBUTION" - -- pkg_platform=`uname -s | tr 'A-Z' 'a-z' | tr -d / | sed -e 's/irix64/irix/'` -+ pkg_platform=linux - test -z "$PLATFORM" || pkg_platform="$PLATFORM" - - -@@ -12604,349 +12604,6 @@ fi - - - --for ac_header in aio.h --do --as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` --if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then -- { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 --$as_echo_n "checking for $ac_header... " >&6; } --if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then -- $as_echo_n "(cached) " >&6 --fi --ac_res=`eval 'as_val=${'$as_ac_Header'} -- $as_echo "$as_val"'` -- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 --$as_echo "$ac_res" >&6; } --else -- # Is the header compilable? --{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 --$as_echo_n "checking $ac_header usability... " >&6; } --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --$ac_includes_default --#include <$ac_header> --_ACEOF --rm -f conftest.$ac_objext --if { (ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" --$as_echo "$ac_try_echo") >&5 -- (eval "$ac_compile") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then -- ac_header_compiler=yes --else -- $as_echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_header_compiler=no --fi -- --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 --$as_echo "$ac_header_compiler" >&6; } -- --# Is the header present? --{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 --$as_echo_n "checking $ac_header presence... " >&6; } --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --#include <$ac_header> --_ACEOF --if { (ac_try="$ac_cpp conftest.$ac_ext" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" --$as_echo "$ac_try_echo") >&5 -- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } >/dev/null && { -- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || -- test ! -s conftest.err -- }; then -- ac_header_preproc=yes --else -- $as_echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_header_preproc=no --fi -- --rm -f conftest.err conftest.$ac_ext --{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 --$as_echo "$ac_header_preproc" >&6; } -- --# So? What about this header? --case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -- yes:no: ) -- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 --$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} -- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 --$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} -- ac_header_preproc=yes -- ;; -- no:yes:* ) -- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 --$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} -- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 --$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} -- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 --$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} -- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 --$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} -- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 --$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} -- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 --$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} -- -- ;; --esac --{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 --$as_echo_n "checking for $ac_header... " >&6; } --if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then -- $as_echo_n "(cached) " >&6 --else -- eval "$as_ac_Header=\$ac_header_preproc" --fi --ac_res=`eval 'as_val=${'$as_ac_Header'} -- $as_echo "$as_val"'` -- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 --$as_echo "$ac_res" >&6; } -- --fi --as_val=`eval 'as_val=${'$as_ac_Header'} -- $as_echo "$as_val"'` -- if test "x$as_val" = x""yes; then -- cat >>confdefs.h <<_ACEOF --#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 --_ACEOF -- --fi -- --done -- -- if test $ac_cv_header_aio_h = no; then -- echo -- echo 'FATAL ERROR: could not find a valid header.' -- exit 1 -- fi -- -- --for ac_func in lio_listio --do --as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` --{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 --$as_echo_n "checking for $ac_func... " >&6; } --if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then -- $as_echo_n "(cached) " >&6 --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --/* Define $ac_func to an innocuous variant, in case declares $ac_func. -- For example, HP-UX 11i declares gettimeofday. */ --#define $ac_func innocuous_$ac_func -- --/* System header to define __stub macros and hopefully few prototypes, -- which can conflict with char $ac_func (); below. -- Prefer to if __STDC__ is defined, since -- exists even on freestanding compilers. */ -- --#ifdef __STDC__ --# include --#else --# include --#endif -- --#undef $ac_func -- --/* Override any GCC internal prototype to avoid an error. -- Use char because int might match the return type of a GCC -- builtin and then its argument prototype would still apply. */ --#ifdef __cplusplus --extern "C" --#endif --char $ac_func (); --/* The GNU C library defines this for functions which it implements -- to always fail with ENOSYS. Some functions are actually named -- something starting with __ and the normal name is an alias. */ --#if defined __stub_$ac_func || defined __stub___$ac_func --choke me --#endif -- --int --main () --{ --return $ac_func (); -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (ac_try="$ac_link" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" --$as_echo "$ac_try_echo") >&5 -- (eval "$ac_link") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest$ac_exeext && { -- test "$cross_compiling" = yes || -- $as_test_x conftest$ac_exeext -- }; then -- eval "$as_ac_var=yes" --else -- $as_echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- eval "$as_ac_var=no" --fi -- --rm -rf conftest.dSYM --rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -- conftest$ac_exeext conftest.$ac_ext --fi --ac_res=`eval 'as_val=${'$as_ac_var'} -- $as_echo "$as_val"'` -- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 --$as_echo "$ac_res" >&6; } --as_val=`eval 'as_val=${'$as_ac_var'} -- $as_echo "$as_val"'` -- if test "x$as_val" = x""yes; then -- cat >>confdefs.h <<_ACEOF --#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 --_ACEOF -- --fi --done -- -- if test $ac_cv_func_lio_listio = yes; then -- librt="" -- else -- --{ $as_echo "$as_me:$LINENO: checking for lio_listio in -lrt" >&5 --$as_echo_n "checking for lio_listio in -lrt... " >&6; } --if test "${ac_cv_lib_rt_lio_listio+set}" = set; then -- $as_echo_n "(cached) " >&6 --else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-lrt -lpthread $LIBS" --cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- --/* Override any GCC internal prototype to avoid an error. -- Use char because int might match the return type of a GCC -- builtin and then its argument prototype would still apply. */ --#ifdef __cplusplus --extern "C" --#endif --char lio_listio (); --int --main () --{ --return lio_listio (); -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (ac_try="$ac_link" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" --$as_echo "$ac_try_echo") >&5 -- (eval "$ac_link") 2>conftest.er1 -- ac_status=$? -- grep -v '^ *+' conftest.er1 >conftest.err -- rm -f conftest.er1 -- cat conftest.err >&5 -- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest$ac_exeext && { -- test "$cross_compiling" = yes || -- $as_test_x conftest$ac_exeext -- }; then -- ac_cv_lib_rt_lio_listio=yes --else -- $as_echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_cv_lib_rt_lio_listio=no --fi -- --rm -rf conftest.dSYM --rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS --fi --{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_rt_lio_listio" >&5 --$as_echo "$ac_cv_lib_rt_lio_listio" >&6; } --if test "x$ac_cv_lib_rt_lio_listio" = x""yes; then -- cat >>confdefs.h <<_ACEOF --#define HAVE_LIBRT 1 --_ACEOF -- -- LIBS="-lrt $LIBS" -- --else -- -- echo -- echo 'FATAL ERROR: could not find a library with lio_listio.' -- exit 1 --fi -- -- librt="-lrt" -- fi -- -- -- -- -- -- - for ac_header in uuid.h sys/uuid.h uuid/uuid.h - do - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` diff --git a/package/xfsprogs/patches/patch-include_buildmacros b/package/xfsprogs/patches/patch-include_buildmacros new file mode 100644 index 000000000..e6b9ae21f --- /dev/null +++ b/package/xfsprogs/patches/patch-include_buildmacros @@ -0,0 +1,11 @@ +--- xfsprogs-3.1.5.orig/include/buildmacros 2011-03-31 00:25:47.000000000 +0200 ++++ xfsprogs-3.1.5/include/buildmacros 2011-10-09 18:12:27.668626203 +0200 +@@ -32,7 +32,7 @@ OBJECTS = $(ASFILES:.s=.o) \ + + INSTALL = $(TOPDIR)/install-sh -o $(PKG_USER) -g $(PKG_GROUP) + +-SHELL = /bin/sh ++SHELL ?= /bin/bash + IMAGES_DIR = $(TOPDIR)/all-images + DIST_DIR = $(TOPDIR)/dist + diff --git a/package/xfsprogs/patches/patch-libxfs_linux_c b/package/xfsprogs/patches/patch-libxfs_linux_c deleted file mode 100644 index 586dab521..000000000 --- a/package/xfsprogs/patches/patch-libxfs_linux_c +++ /dev/null @@ -1,35 +0,0 @@ ---- xfsprogs-3.1.4.orig/libxfs/linux.c 2010-01-29 20:46:13.000000000 +0100 -+++ xfsprogs-3.1.4/libxfs/linux.c 2011-01-22 20:27:29.458658270 +0100 -@@ -16,12 +16,10 @@ - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - --#define ustat __kernel_ustat - #include - #include - #include --#undef ustat --#include -+#include - #include - #include - #include -@@ -49,8 +47,7 @@ static int max_block_alignment; - int - platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose) - { -- /* Pad ust; pre-2.6.28 linux copies out too much in 32bit compat mode */ -- struct ustat ust[2]; -+ struct statvfs info; - struct stat64 st; - - if (!s) { -@@ -61,7 +58,7 @@ platform_check_ismounted(char *name, cha - s = &st; - } - -- if (ustat(s->st_rdev, ust) >= 0) { -+ if (statvfs(name, &info) >= 0) { - if (verbose) - fprintf(stderr, - _("%s: %s contains a mounted filesystem\n"), diff --git a/package/xfsprogs/patches/patch-ltmain_sh b/package/xfsprogs/patches/patch-ltmain_sh deleted file mode 100644 index 6c5c11607..000000000 --- a/package/xfsprogs/patches/patch-ltmain_sh +++ /dev/null @@ -1,11 +0,0 @@ ---- xfsprogs-3.1.4.orig/ltmain.sh 2010-11-11 18:38:26.000000000 +0100 -+++ xfsprogs-3.1.4/ltmain.sh 2011-04-01 20:20:00.951819025 +0200 -@@ -4765,7 +4765,7 @@ func_mode_link () - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) -+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - func_append compile_command " $arg" -- cgit v1.2.3 From 7d7d0ad0d61e22e7fd5c938f2aaf90b00416e6b7 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 10 Oct 2011 13:08:33 +0200 Subject: misc finetuning --- package/font-util/Makefile | 6 +++--- package/section.lst | 2 +- package/sox/Makefile | 2 ++ target/linux/config/Config.in.fs | 5 +++-- target/packages/pkg-available/development | 11 ++++++++++- target/packages/pkg-available/laptop | 10 +++++++++- 6 files changed, 28 insertions(+), 8 deletions(-) diff --git a/package/font-util/Makefile b/package/font-util/Makefile index af4f4d5e0..150a5561c 100644 --- a/package/font-util/Makefile +++ b/package/font-util/Makefile @@ -26,12 +26,12 @@ $(eval $(call PKG_template,FONT_UTIL_DEV,font-util-dev,${PKG_VERSION}-${PKG_RELE # especially as all font packages still need patching to avoid # calling pkg-config (which we don't provide) in order to # automatically find the mappings. -fonts-hack: +post-build: ${INSTALL_DIR} ${STAGING_DIR}/usr/share/fonts/X11/util - ${CP} ${WRKINST}/usr/share/fonts/X11/util/* \ + ${CP} ${WRKBUILD}/map-* \ ${STAGING_DIR}/usr/share/fonts/X11/util -font-util-install: fonts-hack +font-util-install: ${INSTALL_DIR} ${IDIR_FONT_UTIL}/usr/bin ${INSTALL_BIN} ${WRKINST}/usr/bin/ucs2any \ ${IDIR_FONT_UTIL}/usr/bin diff --git a/package/section.lst b/package/section.lst index d1fa5ebf3..b29d9dcb5 100644 --- a/package/section.lst +++ b/package/section.lst @@ -45,6 +45,6 @@ x11/apps X applications x11/drivers X drivers x11/server X server x11/libs X libraries -x11/misc X Misc +x11/misc X misc x11/fonts X fonts x11/devel X headers diff --git a/package/sox/Makefile b/package/sox/Makefile index 4f633b2a6..2f5436146 100644 --- a/package/sox/Makefile +++ b/package/sox/Makefile @@ -18,6 +18,8 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,SOX,sox,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIGURE_ARGS+= --without-ffmpeg + sox-install: $(INSTALL_DIR) $(IDIR_SOX)/usr/lib ${CP} ${WRKINST}/usr/lib/libsox.so* $(IDIR_SOX)/usr/lib diff --git a/target/linux/config/Config.in.fs b/target/linux/config/Config.in.fs index 60b331755..88bf02f62 100644 --- a/target/linux/config/Config.in.fs +++ b/target/linux/config/Config.in.fs @@ -45,7 +45,7 @@ config ADK_KERNEL_FAT_DEFAULT_IOCHARSET default "iso8859-1" config ADK_KERNEL_SQUASHFS - prompt ".................................. SquashFS filesystem" + prompt "squashfs.......................... SquashFS filesystem" boolean select ADK_KERNEL_MISC_FILESYSTEMS default n @@ -181,12 +181,13 @@ config ADK_KPACKAGE_KMOD_VFAT_FS config ADK_KERNEL_XFS_FS + prompt "xfs............................... XFS filesystem support (kernel)" boolean select ADK_KERNEL_EXPORTFS default n config ADK_KPACKAGE_KMOD_XFS_FS - prompt "kmod-fs-xfs....................... XFS filesystem support" + prompt "kmod-fs-xfs....................... XFS filesystem support (module)" tristate select ADK_KERNEL_EXPORTFS depends on !ADK_KERNEL_XFS_FS diff --git a/target/packages/pkg-available/development b/target/packages/pkg-available/development index e058676db..449e1a5b5 100644 --- a/target/packages/pkg-available/development +++ b/target/packages/pkg-available/development @@ -10,6 +10,7 @@ config ADK_PKG_DEVELOPMENT select ADK_PACKAGE_GCC select ADK_PACKAGE_GIT select ADK_PACKAGE_GREP + select ADK_PACKAGE_TAR select ADK_PACKAGE_UCLIBC_DEV if ADK_TARGET_LIB_UCLIBC select ADK_PACKAGE_EGLIBC_DEV if ADK_TARGET_LIB_EGLIBC select ADK_PACKAGE_GLIBC_DEV if ADK_TARGET_LIB_GLIBC @@ -30,9 +31,17 @@ config ADK_PKG_DEVELOPMENT select ADK_PACKAGE_ZLIB select ADK_PACKAGE_ZLIB_DEV select ADK_PACKAGE_XZ + # optional + select ADK_PACKAGE_STRACE + select ADK_PACKAGE_GDB + select ADK_PACKAGE_FLEX + select ADK_PACKAGE_BISON + select ADK_PACKAGE_AUTOCONF + select ADK_PACKAGE_AUTOMAKE + select ADK_PACKAGE_LIBTOOL help After bootstrapping a Linux system you might want to switch to native builds with your target. - If you choose this option, all necessary software needed + If you choose this option, all software required for native building will be selected by this option. diff --git a/target/packages/pkg-available/laptop b/target/packages/pkg-available/laptop index 9663690fe..79e701127 100644 --- a/target/packages/pkg-available/laptop +++ b/target/packages/pkg-available/laptop @@ -1,5 +1,5 @@ config ADK_PKG_LAPTOP - bool "Choose packages for a laptop system with X" + bool "Choose packages for my laptop system with X" default n select ADK_PACKAGE_SCREEN select ADK_PACKAGE_VIM @@ -16,10 +16,18 @@ config ADK_PKG_LAPTOP select ADK_PACKAGE_XORG_SERVER_WITH_DRI select ADK_PACKAGE_XF86_INPUT_KEYBOARD select ADK_PACKAGE_XF86_INPUT_MOUSE + select ADK_PACKAGE_XF86_VIDEO_SILICONMOTION if ADK_TARGET_SYSTEM_LEMOTE_YEELONG + select ADK_PACKAGE_FONT_MISC_MISC select ADK_PACKAGE_SETXKBMAP select ADK_PACKAGE_XBINDKEYS select ADK_PACKAGE_DISPLAY + select ADK_PACKAGE_FEH select ADK_PACKAGE_XINIT select ADK_PACKAGE_EVILWM select ADK_PACKAGE_FIREFOX + select ADK_PACKAGE_DILLO select ADK_PACKAGE_MPLAYER + select ADK_PACKAGE_MPC + select ADK_PACKAGE_WPA_SUPPLICANT + select ADK_PACKAGE_WPA_SUPPLICANT_WITH_OPENSSL + select ADK_KPACKAGE_KMOD_USB_STORAGE -- cgit v1.2.3 From 8dc9983aee254647b438609a6f915efc10d1fd83 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 10 Oct 2011 20:49:22 +0200 Subject: add fix for CPU hangs. --- target/config/Config.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/config/Config.in b/target/config/Config.in index ab651028f..36cad132f 100644 --- a/target/config/Config.in +++ b/target/config/Config.in @@ -371,7 +371,7 @@ config ADK_TARGET_CFLAGS default "-march=amdfam10" if ADK_CPU_AMDFAM10 default "-mcpu=v8" if ADK_CPU_SPARC_V8 default "-m64 -mcpu=v9" if ADK_CPU_SPARC_V9 - default "-march=loongson2f" if ADK_CPU_LOONGSON2F + default "-march=loongson2f -Wa,-mfix-loongson2f-nop" if ADK_CPU_LOONGSON2F default "-march=mips32" if ADK_CPU_MIPS32 default "-march=mips64" if ADK_CPU_MIPS64 default "-march=armv5te -mtune=arm926ej-s" if ADK_CPU_ARMV5 -- cgit v1.2.3 From 559e46aaeab8b018a01e218aac5441424cefe266 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 10 Oct 2011 20:49:48 +0200 Subject: add suid bits after update --- package/base-files/src/sbin/adkupdate | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/package/base-files/src/sbin/adkupdate b/package/base-files/src/sbin/adkupdate index 619faf04f..b5477412f 100755 --- a/package/base-files/src/sbin/adkupdate +++ b/package/base-files/src/sbin/adkupdate @@ -89,6 +89,14 @@ case $1 in ;; esac +# fix permissions +if [ -f /usr/bin/sudo ];then + chmod 4755 /usr/bin/sudo +fi +if [ -f /usr/bin/Xorg ];then + chmod 4755 /usr/bin/Xorg +fi + sync if [ -x /sbin/cfgfs ];then umount /etc -- cgit v1.2.3 From 0ed5cf08edbe2c35e0e68b7895aaca6569eb20b1 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 10 Oct 2011 21:20:25 +0200 Subject: add libltdl dependency --- package/ImageMagick/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package/ImageMagick/Makefile b/package/ImageMagick/Makefile index 46abb9280..2f50ddf20 100644 --- a/package/ImageMagick/Makefile +++ b/package/ImageMagick/Makefile @@ -24,7 +24,7 @@ PKGSC_CONVERT:= multimedia PKGSS_CONVERT:= libimagemagick PKGSD_DISPLAY:= image display application PKGSC_DISPLAY:= multimedia -PKGSS_DISPLAY:= libimagemagick libX11 libXau libXdmcp libICE libSM fontconfig libXt zlib libpng +PKGSS_DISPLAY:= libimagemagick libX11 libXau libXdmcp libICE libSM fontconfig libXt zlib libpng libltdl PKGSB_DISPLAY:= libX11 DISTFILES:= ${PKG_NAME}-${PKG_VERSION}-${PKG_EXTRAVER}.tar.gz @@ -36,7 +36,6 @@ $(eval $(call PKG_template,LIBIMAGEMAGICK,libimagemagick,$(PKG_VERSION)-${PKG_RE $(eval $(call PKG_template,CONVERT,convert,$(PKG_VERSION)-${PKG_RELEASE},${PKGSS_CONVERT},${PKGSD_CONVERT},${PKGSC_CONVERT})) $(eval $(call PKG_template,DISPLAY,display,$(PKG_VERSION)-${PKG_RELEASE},${PKGSS_DISPLAY},${PKGSD_DISPLAY},${PKGSC_DISPLAY})) -TARGET_LDFLAGS+= -L$(STAGING_TARGET_DIR)/lib -L$(STAGING_TARGET_DIR)/usr/lib TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) CONFIGURE_ENV+= ac_cv_sys_file_offset_bits=yes CONFIGURE_ARGS+= --with-magick-plus-plus=no \ -- cgit v1.2.3 From ebbb7f7e7edd29ddcfede17b8bc4300ff481c10e Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 10 Oct 2011 21:20:55 +0200 Subject: xrdb is useful for Xresource management --- target/packages/pkg-available/laptop | 1 + 1 file changed, 1 insertion(+) diff --git a/target/packages/pkg-available/laptop b/target/packages/pkg-available/laptop index 79e701127..0193703de 100644 --- a/target/packages/pkg-available/laptop +++ b/target/packages/pkg-available/laptop @@ -24,6 +24,7 @@ config ADK_PKG_LAPTOP select ADK_PACKAGE_FEH select ADK_PACKAGE_XINIT select ADK_PACKAGE_EVILWM + select ADK_PACKAGE_XRDB select ADK_PACKAGE_FIREFOX select ADK_PACKAGE_DILLO select ADK_PACKAGE_MPLAYER -- cgit v1.2.3 From 123ac5fa80c94080c531fb4bf69d7eff6db1f4d0 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 10 Oct 2011 21:43:59 +0200 Subject: add fix from python upstream to allow host build on ubuntu --- package/python2/Makefile | 3 + package/python2/files/setup.py | 2076 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 2079 insertions(+) create mode 100644 package/python2/files/setup.py diff --git a/package/python2/Makefile b/package/python2/Makefile index 6ab804935..53e770f2d 100644 --- a/package/python2/Makefile +++ b/package/python2/Makefile @@ -42,6 +42,8 @@ CONFIGURE_ARGS:= --with-threads \ --without-cxx-main post-extract: + $(CP) ${WRKBUILD}/setup.py ${WRKBUILD}/setup.py.sav + $(CP) ./files/setup.py ${WRKBUILD}/setup.py $(CP) ./files/posixmodule.c ${WRKBUILD}/Modules/posixmodule.c $(CP) ./files/python-config.in ${WRKBUILD}/Misc/python-config.in (cd ${WRKBUILD}; rm -rf config.{cache,status} ; \ @@ -56,6 +58,7 @@ post-extract: ${CP} ${WRKBUILD}/Parser/pgen ${WRKBUILD}/Parser/hostpgen ${CP} ${WRKBUILD}/python ${WRKBUILD}/hostpython $(MAKE) -C ${WRKBUILD} distclean + $(CP) ${WRKBUILD}/setup.py.sav ${WRKBUILD}/setup.py pre-configure: $(SED) "s#@@CPU_ARCH@@#$(CPU_ARCH)#" ${WRKBUILD}/configure diff --git a/package/python2/files/setup.py b/package/python2/files/setup.py new file mode 100644 index 000000000..baf694e16 --- /dev/null +++ b/package/python2/files/setup.py @@ -0,0 +1,2076 @@ +# Autodetecting setup.py script for building the Python extensions +# + +__version__ = "$Revision: 86041 $" + +import sys, os, imp, re, optparse +from glob import glob +from platform import machine as platform_machine +import sysconfig + +from distutils import log +from distutils import text_file +from distutils.errors import * +from distutils.core import Extension, setup +from distutils.command.build_ext import build_ext +from distutils.command.install import install +from distutils.command.install_lib import install_lib +from distutils.spawn import find_executable + +# Were we compiled --with-pydebug or with #define Py_DEBUG? +COMPILED_WITH_PYDEBUG = hasattr(sys, 'gettotalrefcount') + +# This global variable is used to hold the list of modules to be disabled. +disabled_module_list = [] + +def add_dir_to_list(dirlist, dir): + """Add the directory 'dir' to the list 'dirlist' (at the front) if + 1) 'dir' is not already in 'dirlist' + 2) 'dir' actually exists, and is a directory.""" + if dir is not None and os.path.isdir(dir) and dir not in dirlist: + dirlist.insert(0, dir) + +def macosx_sdk_root(): + """ + Return the directory of the current OSX SDK, + or '/' if no SDK was specified. + """ + cflags = sysconfig.get_config_var('CFLAGS') + m = re.search(r'-isysroot\s+(\S+)', cflags) + if m is None: + sysroot = '/' + else: + sysroot = m.group(1) + return sysroot + +def is_macosx_sdk_path(path): + """ + Returns True if 'path' can be located in an OSX SDK + """ + return (path.startswith('/usr/') and not path.startswith('/usr/local')) or path.startswith('/System/') + +def find_file(filename, std_dirs, paths): + """Searches for the directory where a given file is located, + and returns a possibly-empty list of additional directories, or None + if the file couldn't be found at all. + + 'filename' is the name of a file, such as readline.h or libcrypto.a. + 'std_dirs' is the list of standard system directories; if the + file is found in one of them, no additional directives are needed. + 'paths' is a list of additional locations to check; if the file is + found in one of them, the resulting list will contain the directory. + """ + if sys.platform == 'darwin': + # Honor the MacOSX SDK setting when one was specified. + # An SDK is a directory with the same structure as a real + # system, but with only header files and libraries. + sysroot = macosx_sdk_root() + + # Check the standard locations + for dir in std_dirs: + f = os.path.join(dir, filename) + + if sys.platform == 'darwin' and is_macosx_sdk_path(dir): + f = os.path.join(sysroot, dir[1:], filename) + + if os.path.exists(f): return [] + + # Check the additional directories + for dir in paths: + f = os.path.join(dir, filename) + + if sys.platform == 'darwin' and is_macosx_sdk_path(dir): + f = os.path.join(sysroot, dir[1:], filename) + + if os.path.exists(f): + return [dir] + + # Not found anywhere + return None + +def find_library_file(compiler, libname, std_dirs, paths): + result = compiler.find_library_file(std_dirs + paths, libname) + if result is None: + return None + + if sys.platform == 'darwin': + sysroot = macosx_sdk_root() + + # Check whether the found file is in one of the standard directories + dirname = os.path.dirname(result) + for p in std_dirs: + # Ensure path doesn't end with path separator + p = p.rstrip(os.sep) + + if sys.platform == 'darwin' and is_macosx_sdk_path(p): + if os.path.join(sysroot, p[1:]) == dirname: + return [ ] + + if p == dirname: + return [ ] + + # Otherwise, it must have been in one of the additional directories, + # so we have to figure out which one. + for p in paths: + # Ensure path doesn't end with path separator + p = p.rstrip(os.sep) + + if sys.platform == 'darwin' and is_macosx_sdk_path(p): + if os.path.join(sysroot, p[1:]) == dirname: + return [ p ] + + if p == dirname: + return [p] + else: + assert False, "Internal error: Path not found in std_dirs or paths" + +def module_enabled(extlist, modname): + """Returns whether the module 'modname' is present in the list + of extensions 'extlist'.""" + extlist = [ext for ext in extlist if ext.name == modname] + return len(extlist) + +def find_module_file(module, dirlist): + """Find a module in a set of possible folders. If it is not found + return the unadorned filename""" + list = find_file(module, [], dirlist) + if not list: + return module + if len(list) > 1: + log.info("WARNING: multiple copies of %s found"%module) + return os.path.join(list[0], module) + +class PyBuildExt(build_ext): + + def __init__(self, dist): + build_ext.__init__(self, dist) + self.failed = [] + + def build_extensions(self): + + # Detect which modules should be compiled + missing = self.detect_modules() + + # Remove modules that are present on the disabled list + extensions = [ext for ext in self.extensions + if ext.name not in disabled_module_list] + # move ctypes to the end, it depends on other modules + ext_map = dict((ext.name, i) for i, ext in enumerate(extensions)) + if "_ctypes" in ext_map: + ctypes = extensions.pop(ext_map["_ctypes"]) + extensions.append(ctypes) + self.extensions = extensions + + # Fix up the autodetected modules, prefixing all the source files + # with Modules/ and adding Python's include directory to the path. + (srcdir,) = sysconfig.get_config_vars('srcdir') + if not srcdir: + # Maybe running on Windows but not using CYGWIN? + raise ValueError("No source directory; cannot proceed.") + srcdir = os.path.abspath(srcdir) + moddirlist = [os.path.join(srcdir, 'Modules')] + + # Platform-dependent module source and include directories + incdirlist = [] + platform = self.get_platform() + if platform == 'darwin' and ("--disable-toolbox-glue" not in + sysconfig.get_config_var("CONFIG_ARGS")): + # Mac OS X also includes some mac-specific modules + macmoddir = os.path.join(srcdir, 'Mac/Modules') + moddirlist.append(macmoddir) + incdirlist.append(os.path.join(srcdir, 'Mac/Include')) + + # Fix up the paths for scripts, too + self.distribution.scripts = [os.path.join(srcdir, filename) + for filename in self.distribution.scripts] + + # Python header files + headers = [sysconfig.get_config_h_filename()] + headers += glob(os.path.join(sysconfig.get_path('platinclude'), "*.h")) + for ext in self.extensions[:]: + ext.sources = [ find_module_file(filename, moddirlist) + for filename in ext.sources ] + if ext.depends is not None: + ext.depends = [find_module_file(filename, moddirlist) + for filename in ext.depends] + else: + ext.depends = [] + # re-compile extensions if a header file has been changed + ext.depends.extend(headers) + + # platform specific include directories + ext.include_dirs.extend(incdirlist) + + # If a module has already been built statically, + # don't build it here + if ext.name in sys.builtin_module_names: + self.extensions.remove(ext) + + # Parse Modules/Setup and Modules/Setup.local to figure out which + # modules are turned on in the file. + remove_modules = [] + for filename in ('Modules/Setup', 'Modules/Setup.local'): + input = text_file.TextFile(filename, join_lines=1) + while 1: + line = input.readline() + if not line: break + line = line.split() + remove_modules.append(line[0]) + input.close() + + for ext in self.extensions[:]: + if ext.name in remove_modules: + self.extensions.remove(ext) + + # When you run "make CC=altcc" or something similar, you really want + # those environment variables passed into the setup.py phase. Here's + # a small set of useful ones. + compiler = os.environ.get('CC') + args = {} + # unfortunately, distutils doesn't let us provide separate C and C++ + # compilers + if compiler is not None: + (ccshared,cflags) = sysconfig.get_config_vars('CCSHARED','CFLAGS') + args['compiler_so'] = compiler + ' ' + ccshared + ' ' + cflags + self.compiler.set_executables(**args) + + build_ext.build_extensions(self) + + longest = max([len(e.name) for e in self.extensions]) + if self.failed: + longest = max(longest, max([len(name) for name in self.failed])) + + def print_three_column(lst): + lst.sort(key=str.lower) + # guarantee zip() doesn't drop anything + while len(lst) % 3: + lst.append("") + for e, f, g in zip(lst[::3], lst[1::3], lst[2::3]): + print "%-*s %-*s %-*s" % (longest, e, longest, f, + longest, g) + + if missing: + print + print ("Python build finished, but the necessary bits to build " + "these modules were not found:") + print_three_column(missing) + print ("To find the necessary bits, look in setup.py in" + " detect_modules() for the module's name.") + print + + if self.failed: + failed = self.failed[:] + print + print "Failed to build these modules:" + print_three_column(failed) + print + + def build_extension(self, ext): + + if ext.name == '_ctypes': + if not self.configure_ctypes(ext): + return + + try: + build_ext.build_extension(self, ext) + except (CCompilerError, DistutilsError), why: + self.announce('WARNING: building of extension "%s" failed: %s' % + (ext.name, sys.exc_info()[1])) + self.failed.append(ext.name) + return + # Workaround for Mac OS X: The Carbon-based modules cannot be + # reliably imported into a command-line Python + if 'Carbon' in ext.extra_link_args: + self.announce( + 'WARNING: skipping import check for Carbon-based "%s"' % + ext.name) + return + + if self.get_platform() == 'darwin' and ( + sys.maxint > 2**32 and '-arch' in ext.extra_link_args): + # Don't bother doing an import check when an extension was + # build with an explicit '-arch' flag on OSX. That's currently + # only used to build 32-bit only extensions in a 4-way + # universal build and loading 32-bit code into a 64-bit + # process will fail. + self.announce( + 'WARNING: skipping import check for "%s"' % + ext.name) + return + + # Workaround for Cygwin: Cygwin currently has fork issues when many + # modules have been imported + if self.get_platform() == 'cygwin': + self.announce('WARNING: skipping import check for Cygwin-based "%s"' + % ext.name) + return + ext_filename = os.path.join( + self.build_lib, + self.get_ext_filename(self.get_ext_fullname(ext.name))) + try: + imp.load_dynamic(ext.name, ext_filename) + except ImportError, why: + self.failed.append(ext.name) + self.announce('*** WARNING: renaming "%s" since importing it' + ' failed: %s' % (ext.name, why), level=3) + assert not self.inplace + basename, tail = os.path.splitext(ext_filename) + newname = basename + "_failed" + tail + if os.path.exists(newname): + os.remove(newname) + os.rename(ext_filename, newname) + + # XXX -- This relies on a Vile HACK in + # distutils.command.build_ext.build_extension(). The + # _built_objects attribute is stored there strictly for + # use here. + # If there is a failure, _built_objects may not be there, + # so catch the AttributeError and move on. + try: + for filename in self._built_objects: + os.remove(filename) + except AttributeError: + self.announce('unable to remove files (ignored)') + except: + exc_type, why, tb = sys.exc_info() + self.announce('*** WARNING: importing extension "%s" ' + 'failed with %s: %s' % (ext.name, exc_type, why), + level=3) + self.failed.append(ext.name) + + def get_platform(self): + # Get value of sys.platform + for platform in ['cygwin', 'beos', 'darwin', 'atheos', 'osf1']: + if sys.platform.startswith(platform): + return platform + return sys.platform + + def add_multiarch_paths(self): + # Debian/Ubuntu multiarch support. + # https://wiki.ubuntu.com/MultiarchSpec + if not find_executable('dpkg-architecture'): + return + tmpfile = os.path.join(self.build_temp, 'multiarch') + if not os.path.exists(self.build_temp): + os.makedirs(self.build_temp) + ret = os.system( + 'dpkg-architecture -qDEB_HOST_MULTIARCH > %s 2> /dev/null' % + tmpfile) + try: + if ret >> 8 == 0: + with open(tmpfile) as fp: + multiarch_path_component = fp.readline().strip() + add_dir_to_list(self.compiler.library_dirs, + '/usr/lib/' + multiarch_path_component) + add_dir_to_list(self.compiler.include_dirs, + '/usr/include/' + multiarch_path_component) + finall