Browse Source

fix cross-compile under Darwin

Waldemar Brodkorb 14 years ago
parent
commit
0eae06e5fb

+ 3 - 2
package/libvirt/Makefile

@@ -4,9 +4,9 @@
 include ${TOPDIR}/rules.mk
 
 PKG_NAME:=		libvirt
-PKG_VERSION:=		0.8.6
+PKG_VERSION:=		0.8.7
 PKG_RELEASE:=		1
-PKG_MD5SUM:=		9ed61a02983dc42d0ea0224711ace025
+PKG_MD5SUM:=		596bafb53bb6c079a0703f1726cb2305
 PKG_DESCR:=		virtualization API
 PKG_SECTION:=		libs
 PKG_DEPENDS:=		libxml2 libgnutls python2 libpcap
@@ -28,6 +28,7 @@ CONFIGURE_ARGS+=	--without-xen \
 			--without-openvz \
 			--without-lxc \
 			--without-vbox \
+			--without-macvtap \
 			--disable-silent-rules \
 			--without-sasl
 

+ 4 - 4
package/libvirt/patches/patch-src_storage_storage_backend_c

@@ -1,6 +1,6 @@
---- libvirt-0.7.4.orig/src/storage/storage_backend.c	2009-11-10 14:32:15.000000000 +0100
-+++ libvirt-0.7.4/src/storage/storage_backend.c	2009-11-23 22:51:40.000000000 +0100
-@@ -136,7 +136,7 @@ virStorageBackendCopyToFD(virConnectPtr 
+--- libvirt-0.8.7.orig/src/storage/storage_backend.c	2010-12-22 09:54:05.000000000 +0100
++++ libvirt-0.8.7/src/storage/storage_backend.c	2011-01-12 18:30:49.000000000 +0100
+@@ -131,7 +131,7 @@ virStorageBackendCopyToFD(virStorageVolD
          goto cleanup;
      }
  
@@ -8,4 +8,4 @@
 +    memset(&zerobuf, 0, sizeof(zerobuf));
  
      if (VIR_ALLOC_N(buf, bytes) < 0) {
-         virReportOOMError(conn);
+         ret = -errno;

+ 5 - 5
package/python2/Makefile

@@ -40,12 +40,12 @@ post-extract:
 	(cd ${WRKBUILD}; rm -rf config.{cache,status} ; \
 		OPT="$(HOSTCFLAGS)" \
 		./configure --without-cxx-main --without-threads \
-		--prefix=$(STAGING_HOST_DIR) \
+		--prefix=$(STAGING_HOST_DIR)/usr \
 	);
 	$(MAKE) -C ${WRKBUILD} python Parser/pgen
 	$(MAKE) -C ${WRKBUILD} install
-	${CP} ${WRKBUILD}/Parser/pgen ${STAGING_HOST_DIR}/bin/pgen
-	${CP} ${WRKBUILD}/python ${STAGING_HOST_DIR}/bin/hostpython
+	${CP} ${WRKBUILD}/Parser/pgen ${STAGING_HOST_DIR}/usr/bin/pgen
+	${CP} ${WRKBUILD}/python ${STAGING_HOST_DIR}/usr/bin/hostpython
 	${CP} ${WRKBUILD}/Parser/pgen ${WRKBUILD}/Parser/hostpgen
 	${CP} ${WRKBUILD}/python ${WRKBUILD}/hostpython
 	$(MAKE) -C ${WRKBUILD} clean
@@ -63,7 +63,7 @@ post-install:
 	${CP} ${WRKINST}/usr/include/python2.7/* ${IDIR_PYTHON2}/usr/include/python2.7
 	-find ${IDIR_PYTHON2} -name "\*.pyc" -o -name "*\.pyo" -exec rm {} \;
 	# workaround, copy host python-config to target scripts directory
-	${CP} ${STAGING_HOST_DIR}/bin/python*-config ${STAGING_TARGET_DIR}/scripts
-	${CP} ${STAGING_HOST_DIR}/bin/python*-config ${STAGING_TARGET_DIR}/usr/bin
+	${CP} ${STAGING_HOST_DIR}/usr/bin/python*-config ${STAGING_TARGET_DIR}/scripts
+	${CP} ${STAGING_HOST_DIR}/usr/bin/python*-config ${STAGING_TARGET_DIR}/usr/bin
 
 include ${TOPDIR}/mk/pkg-bottom.mk

+ 2 - 2
package/python2/files/python-config.in

@@ -38,8 +38,8 @@ for opt in opt_flags:
         print sysconfig.EXEC_PREFIX
 
     elif opt in ('--includes', '--cflags'):
-        flags = ['-I' + re.sub('host/', 'target/usr/', sysconfig.get_python_inc()),
-                 '-I' + re.sub('host/', 'target/usr/', sysconfig.get_python_inc(plat_specific=True))]
+        flags = ['-I' + re.sub('host_', 'target_', sysconfig.get_python_inc()),
+                 '-I' + re.sub('host_', 'target_', sysconfig.get_python_inc(plat_specific=True))]
         if opt == '--cflags':
             flags.extend(getvar('CFLAGS').split())
         print ' '.join(flags)