summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornslu2-linux.adm@bkbits.net <nslu2-linux.adm@bkbits.net>2005-01-08 13:40:08 +0000
committernslu2-linux.adm@bkbits.net <nslu2-linux.adm@bkbits.net>2005-01-08 13:40:08 +0000
commit7ccc337fe03e352ac41acd3f75480c61fd065fff (patch)
tree6df7ea0e274beb3f004aa0b690a6e40720b95403
parent224b5f7211f0134d33f60df1650c099d0973a0ff (diff)
Merge bk://oe-devel.bkbits.net/openembedded
into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/01/08 13:20:55+00:00 nexus.co.uk!pb update meta-sdk 2005/01/08 13:20:18+00:00 nexus.co.uk!pb update ipkg depends/provides patch BKrev: 41dfe2b8ASrMvp2BeYdB97wuiF8zuQ
-rw-r--r--packages/ipkg/ipkg-0.99.135/depends.patch107
-rw-r--r--packages/ipkg/ipkg_0.99.135.bb53
-rw-r--r--packages/meta/meta-sdk.bb160
3 files changed, 320 insertions, 0 deletions
diff --git a/packages/ipkg/ipkg-0.99.135/depends.patch b/packages/ipkg/ipkg-0.99.135/depends.patch
index e69de29bb2..8f472ab405 100644
--- a/packages/ipkg/ipkg-0.99.135/depends.patch
+++ b/packages/ipkg/ipkg-0.99.135/depends.patch
@@ -0,0 +1,107 @@
+Index: ipkg_cmd.c
+===================================================================
+RCS file: /cvs/familiar/dist/ipkg/C/ipkg_cmd.c,v
+retrieving revision 1.99
+diff -u -r1.99 ipkg_cmd.c
+--- ipkg/ipkg_cmd.c 6 Jan 2005 00:21:49 -0000 1.99
++++ ipkg/ipkg_cmd.c 8 Jan 2005 13:11:16 -0000
+@@ -1150,7 +1150,7 @@
+
+ int pkg_mark_provides(pkg_t *pkg)
+ {
+- int provides_count = pkg->provides_count;
++ int provides_count = pkg->provides_count + 1;
+ abstract_pkg_t **provides = pkg->provides;
+ int i;
+ pkg->parent->state_flag |= SF_MARKED;
+@@ -1207,7 +1207,7 @@
+ for (j = 0; j < available_pkgs->len; j++) {
+ pkg_t *pkg = available_pkgs->pkgs[j];
+ int k;
+- int count = (what_field_type == WHATPROVIDES) ? pkg->provides_count : pkg->replaces_count;
++ int count = (what_field_type == WHATPROVIDES) ? pkg->provides_count + 1 : pkg->replaces_count;
+ for (k = 0; k < count; k++) {
+ abstract_pkg_t *apkg =
+ ((what_field_type == WHATPROVIDES)
+Index: ipkg_remove.c
+===================================================================
+RCS file: /cvs/familiar/dist/ipkg/C/ipkg_remove.c,v
+retrieving revision 1.40
+diff -u -r1.40 ipkg_remove.c
+--- ipkg/ipkg_remove.c 10 May 2004 21:37:07 -0000 1.40
++++ ipkg/ipkg_remove.c 8 Jan 2005 13:11:19 -0000
+@@ -39,7 +39,7 @@
+ */
+ int pkg_has_installed_dependents(ipkg_conf_t *conf, abstract_pkg_t *parent_apkg, pkg_t *pkg, abstract_pkg_t *** pdependents)
+ {
+- int nprovides = pkg->provides_count;
++ int nprovides = pkg->provides_count + 1;
+ abstract_pkg_t **provides = pkg->provides;
+ int n_installed_dependents = 0;
+ int i;
+Index: pkg_depends.c
+===================================================================
+RCS file: /cvs/familiar/dist/ipkg/C/pkg_depends.c,v
+retrieving revision 1.61
+diff -u -r1.61 pkg_depends.c
+--- ipkg/pkg_depends.c 1 Sep 2004 20:30:39 -0000 1.61
++++ ipkg/pkg_depends.c 8 Jan 2005 13:11:21 -0000
+@@ -420,9 +420,9 @@
+ int pkg_has_common_provides(pkg_t *pkg, pkg_t *replacee)
+ {
+ abstract_pkg_t **provides = pkg->provides;
+- int provides_count = pkg->provides_count;
++ int provides_count = pkg->provides_count + 1;
+ abstract_pkg_t **replacee_provides = replacee->provides;
+- int replacee_provides_count = replacee->provides_count;
++ int replacee_provides_count = replacee->provides_count + 1;
+ int i, j;
+ for (i = 0; i < provides_count; i++) {
+ abstract_pkg_t *apkg = provides[i];
+@@ -443,7 +443,7 @@
+ int pkg_provides_abstract(pkg_t *pkg, abstract_pkg_t *providee)
+ {
+ abstract_pkg_t **provides = pkg->provides;
+- int provides_count = pkg->provides_count;
++ int provides_count = pkg->provides_count + 1;
+ int i;
+ for (i = 0; i < provides_count; i++) {
+ if (provides[i] == providee)
+@@ -461,7 +461,7 @@
+ abstract_pkg_t **replaces = pkg->replaces;
+ int replaces_count = pkg->replaces_count;
+ abstract_pkg_t **replacee_provides = pkg->provides;
+- int replacee_provides_count = pkg->provides_count;
++ int replacee_provides_count = pkg->provides_count + 1;
+ int i, j;
+ for (i = 0; i < replaces_count; i++) {
+ abstract_pkg_t *abstract_replacee = replaces[i];
+@@ -504,7 +504,7 @@
+ compound_depend_t *conflicts = pkg->conflicts;
+ int conflicts_count = pkg->conflicts_count;
+ abstract_pkg_t **conflictee_provides = conflictee->provides;
+- int conflictee_provides_count = conflictee->provides_count;
++ int conflictee_provides_count = conflictee->provides_count + 1;
+ int i, j, k;
+ for (i = 0; i < conflicts_count; i++) {
+ int possibility_count = conflicts[i].possibility_count;
+@@ -605,9 +605,6 @@
+ /* every pkg provides itself */
+ abstract_pkg_vec_insert(ab_pkg->provided_by, ab_pkg);
+
+- if (!pkg->provides_count)
+- return 0;
+-
+ pkg->provides = (abstract_pkg_t **)malloc(sizeof(abstract_pkg_t *) * (pkg->provides_count + 1));
+ if (pkg->provides == NULL) {
+ fprintf(stderr, "%s: out of memory\n", __FUNCTION__);
+@@ -615,6 +612,9 @@
+ }
+ pkg->provides[0] = ab_pkg;
+
++ if (pkg->provides_count == 0)
++ return 0;
++
+ // if (strcmp(ab_pkg->name, pkg->name))
+ // fprintf(stderr, __FUNCTION__ ": ab_pkg=%s pkg=%s\n", ab_pkg->name, pkg->name);
+
diff --git a/packages/ipkg/ipkg_0.99.135.bb b/packages/ipkg/ipkg_0.99.135.bb
index e69de29bb2..396e33e101 100644
--- a/packages/ipkg/ipkg_0.99.135.bb
+++ b/packages/ipkg/ipkg_0.99.135.bb
@@ -0,0 +1,53 @@
+SECTION = "base"
+DESCRIPTION = "Itsy Package Manager"
+DESCRIPTION_libipkg = "Itsy Package Manager Library"
+LICENSE = "GPL"
+PROVIDES = "virtual/ipkg libipkg"
+PR = "r1"
+
+PACKAGES =+ "libipkg-dev libipkg"
+FILES_libipkg-dev = "${libdir}/*.a ${libdir}/*.la ${libdir}/*.so"
+FILES_libipkg = "${libdir}"
+AUTO_LIBNAME_PKGS = "libipkg"
+
+SRC_URI = "${HANDHELDS_CVS};module=familiar/dist/ipkg;tag=${@'V' + bb.data.getVar('PV',d,1).replace('.', '-')} \
+ file://depends.patch;patch=1 \
+ file://uninclude-replace.patch;patch=1 \
+ file://terse.patch;patch=1"
+S = "${WORKDIR}/ipkg/C"
+
+inherit autotools pkgconfig
+
+pkg_postinst_ipkg () {
+#!/bin/sh
+if [ "x$D" != "x" ]; then
+ install -d ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d
+ # this happens at S98 where our good 'ole packages script used to run
+ echo -e "#!/bin/sh
+ipkg-cl configure
+" > ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d/S98configure
+ chmod 0755 ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d/S98configure
+fi
+
+update-alternatives --install /usr/bin/ipkg ipkg /usr/bin/ipkg-cl 100
+}
+
+pkg_postrm_ipkg () {
+#!/bin/sh
+update-alternatives --remove ipkg /usr/bin/ipkg-cl
+}
+
+do_stage() {
+ oe_libinstall -so libipkg ${STAGING_LIBDIR}
+ install -d ${STAGING_INCDIR}/replace/
+ install -m 0644 replace/replace.h ${STAGING_INCDIR}/replace/
+ install -d ${STAGING_INCDIR}/libipkg/
+ for f in *.h
+ do
+ install -m 0644 $f ${STAGING_INCDIR}/libipkg/
+ done
+}
+
+#
+# FIXME: Install /etc/ipkg.conf and /etc/ipkg/arch.conf
+#
diff --git a/packages/meta/meta-sdk.bb b/packages/meta/meta-sdk.bb
index e69de29bb2..7fac799d51 100644
--- a/packages/meta/meta-sdk.bb
+++ b/packages/meta/meta-sdk.bb
@@ -0,0 +1,160 @@
+PR = "r1"
+
+DEPENDS = "ipkg-native ipkg-utils-native binutils-cross-sdk gcc-cross-sdk gdb-cross fakeroot-native meta-gpe"
+
+PACKAGES = ""
+
+inherit sdk
+
+SDK_DIR = "${WORKDIR}/sdk"
+SDK_OUTPUT = "${SDK_DIR}/image"
+SDK_DEPLOY = "${TMPDIR}/deploy/sdk"
+
+IPKG_HOST = "ipkg-cl -f ${SDK_DIR}/ipkg-host.conf -o ${SDK_OUTPUT}"
+IPKG_TARGET = "ipkg-cl -f ${SDK_DIR}/ipkg-target.conf -o ${SDK_OUTPUT}/${prefix}"
+
+HOST_INSTALL = "binutils-cross-sdk gcc-cross-sdk gdb-cross"
+TARGET_INSTALL = "libc6 libc6-dev \
+compositeext-dev \
+damageext-dev \
+dbus-dev \
+fixesext-dev \
+gconf-dev \
+gtk+-dev \
+gtk-engines-dev \
+libapm-dev \
+libatk-1.0-dev \
+libaudiofile-dev \
+libbluetooth-dev \
+libcairo-dev \
+libesd-dev \
+libeventdb-dev \
+libexpat-dev \
+libfontconfig-dev \
+libfreetype-dev \
+libgcrypt-dev \
+libglade-2.0-dev \
+libglib-2.0-dev \
+libgpelaunch-dev \
+libgpepimc-dev \
+libgpewidget-dev \
+libgpg-error-dev \
+libice-dev \
+libidl-2-dev \
+libipkg-dev \
+libjpeg-dev \
+libmb-dev \
+libmimedir-dev \
+libopenobex-1.0-dev \
+libpcap-dev \
+libpixman-dev \
+libpng-dev \
+libpng12-dev \
+libpopt-dev \
+libreadline-dev \
+libschedule-dev \
+libsm-dev \
+libsoundgen-dev \
+libsqlite-dev \
+libstartup-notification-1-dev \
+libsvg-cairo-dev \
+libsvg-dev \
+libtododb-dev \
+libts-0.0-dev \
+libx11-dev \
+libxau-dev \
+libxcalibrate-dev \
+libxcomposite-dev \
+libxcursor-dev \
+libxdamage-dev \
+libxdmcp-dev \
+libxext-dev \
+libxfixes-dev \
+libxfont-dev \
+libxft-dev \
+libxml2-dev \
+libxpm-dev \
+libxrandr-dev \
+libxrender-dev \
+libxsettings-client-dev \
+libxsettings-dev \
+libxss-dev \
+libxt-dev \
+libxtst-dev \
+libz-dev \
+matchbox-desktop-dev \
+ncurses-dev \
+orbit2-dev \
+pango-dev \
+randrext-dev \
+recordext-dev \
+renderext-dev \
+resourceext-dev \
+rxvt-unicode-dev \
+wireless-tools-dev \
+xcalibrateext-dev \
+xextensions-dev \
+xmu-dev \
+xproto-dev \
+xtrans-dev \
+"
+
+do_populate_sdk() {
+ touch ${DEPLOY_DIR_IPK}/Packages
+ ipkg-make-index -r ${DEPLOY_DIR_IPK}/Packages -p ${DEPLOY_DIR_IPK}/Packages -l ${DEPLOY_DIR_IPK}/Packages.filelist -m ${DEPLOY_DIR_IPK}
+
+ rm -rf ${SDK_OUTPUT}
+ mkdir -p ${SDK_OUTPUT}
+
+ cat <<EOF >${SDK_DIR}/ipkg-host.conf
+src oe file:${DEPLOY_DIR_IPK}
+arch ${BUILD_ARCH} 1
+EOF
+ cat <<EOF >${SDK_DIR}/ipkg-target.conf
+src oe file:${DEPLOY_DIR_IPK}
+EOF
+ ipkgarchs="all any noarch ${TARGET_ARCH} ${IPKG_ARCHS} ${MACHINE}"
+ priority=1
+ for arch in $ipkgarchs; do
+ echo "arch $arch $priority" >> ${SDK_DIR}/ipkg-target.conf
+ priority=$(expr $priority + 5)
+ done
+
+ rm -r ${SDK_OUTPUT}
+ mkdir -p ${SDK_OUTPUT}
+
+ ${IPKG_HOST} update
+ ${IPKG_HOST} --nodeps install ${HOST_INSTALL}
+ ${IPKG_TARGET} update
+ ${IPKG_TARGET} install ${TARGET_INSTALL}
+
+ mkdir -p ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}
+ cp -a ${SDK_OUTPUT}/${prefix}/usr/* ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}
+ rm -rf ${SDK_OUTPUT}/${prefix}/usr/
+
+ cp -a ${SDK_OUTPUT}/${prefix}/lib/* ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib
+ rm -rf ${SDK_OUTPUT}/${prefix}/lib/*
+ mv ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/gcc ${SDK_OUTPUT}/${prefix}/lib
+
+ cp -a ${TMPDIR}/cross/${TARGET_SYS}/include/linux/ ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/include/
+ cp -a ${TMPDIR}/cross/${TARGET_SYS}/include/asm/ ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/include/
+ chmod -R a+r ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/include/
+ find ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/include/ -type d | xargs chmod +x
+
+ echo 'GROUP ( libpthread.so.0 libpthread_nonshared.a )' > ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/libpthread.so
+ echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/libc.so
+
+ # remove unwanted housekeeping files
+ mv ${SDK_OUTPUT}/usr/lib/ipkg/status ${SDK_OUTPUT}/${prefix}/package-status
+ rm -rf ${SDK_OUTPUT}/usr/lib/ipkg
+
+ # remove unwanted executables
+ rm -rf ${SDK_OUTPUT}/${prefix}/sbin ${SDK_OUTPUT}/${prefix}/etc
+
+ mkdir -p ${SDK_DEPLOY}
+ cd ${SDK_OUTPUT}
+ fakeroot tar cfj ${SDK_DEPLOY}/oe-sdk-$(date +"%Y%m%d%H%M%S").tar.bz2 .
+}
+
+do_populate_sdk[nostamp] = 1
+addtask populate_sdk before do_build after do_install