From 44bef8ba85a10cf004054f23a6b29de4d9af159f Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Fri, 21 Feb 2014 22:17:14 +0000 Subject: [PATCH 1/2] findutils: add recipe for 4.4.2 --- sys-apps/findutils/findutils-4.4.2.recipe | 68 +++++++++++++++-------- 1 file changed, 45 insertions(+), 23 deletions(-) diff --git a/sys-apps/findutils/findutils-4.4.2.recipe b/sys-apps/findutils/findutils-4.4.2.recipe index cb8b14ff4..c2c8b1e38 100644 --- a/sys-apps/findutils/findutils-4.4.2.recipe +++ b/sys-apps/findutils/findutils-4.4.2.recipe @@ -1,32 +1,54 @@ -DESCRIPTION="GNU utilities for finding files" -HOMEPAGE="http://www.gnu.org/software/findutils/" -SRC_URI="http://mirrors.usc.edu/pub/gnu/findutils/findutils-4.4.2.tar.gz" -REVISION="1" -STATUS_HAIKU="stable" -DEPEND="" +SUMMARY="Basic directory searching utilities" +DESCRIPTION=" +GNU Findutils are typically used in conjunction with other programs to \ +provide modular and powerful directory search and file locating \ +capabilities to other commands. +The tools supplied with this package are: +find - search for files in a directory hierarchy +locate - list files in databases that match a pattern +updatedb - update a file name database +xargs - build and execute command lines from a standard input. +" +HOMEPAGE="http://www.gnu.org/software/findutils" +COPYRIGHT="1994-2011 Free Software Foundation, Inc." +LICENSE="GNU GPL v3" +SRC_URI="http://ftp.gnu.org/gnu/findutils/findutils-4.4.2.tar.gz" CHECKSUM_MD5="351cc4adb07d54877fa15f75fb77d39f" +REVISION="1" +ARCHITECTURES="x86_gcc2 x86 x86_64" + +PROVIDES=" + findutils = $portVersion compat >= 4 + cmd:find = $portVersion compat >= 4 + cmd:locate = $portVersion compat >= 4 + cmd:updatedb = $portVersion compat >= 4 + cmd:xargs = $portVersion compat >= 4 + " +REQUIRES=" + haiku >= $haikuVersion + " +BUILD_PREREQUIRES=" + haiku_devel >= $haikuVersion + cmd:gcc + cmd:ld + cmd:make + " + +defineDebugInfoPackage findutils \ + $binDir/find \ + $binDir/locate \ + $binDir/xargs + BUILD() { - cd findutils-4.4.2 - ./import-gnulib.sh - libtoolize --force --copy --install - MANDIR=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`/man - ./configure --prefix=`finddir B_COMMON_DIRECTORY` \ - --mandir=${MANDIR} - make + runConfigure ./configure \ + --without-included-regex \ + --disable-rpath --with-gnu-ld + make $jobArgs } INSTALL() { - cd findutils-4.4.2 make install + rm $libDir/charset.alias } - -TEST() -{ - cd findutils-4.4.2 - make install -} - -LICENSE="GNU GPL v3" -COPYRIGHT="1990-2010 Free Software Foundation, Inc." From 3b95b2ad778f08d67e2cdb2f68e5b4e26a0d6bdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Sun, 23 Feb 2014 04:20:34 +0100 Subject: [PATCH 2/2] opensound: Add updated git recipe OSS moved to git some time ago... Add a patchset to adapt the build system to PM. Marked as untested since it doesn't track a specific revision. --- .../opensound/opensound-4.2_git.recipe | 52 +++++ .../patches/opensound-4.2_git.patchset | 197 ++++++++++++++++++ 2 files changed, 249 insertions(+) create mode 100644 media-sound/opensound/opensound-4.2_git.recipe create mode 100644 media-sound/opensound/patches/opensound-4.2_git.patchset diff --git a/media-sound/opensound/opensound-4.2_git.recipe b/media-sound/opensound/opensound-4.2_git.recipe new file mode 100644 index 000000000..ba5948e39 --- /dev/null +++ b/media-sound/opensound/opensound-4.2_git.recipe @@ -0,0 +1,52 @@ +SUMMARY="Open Sound System" +DESCRIPTION="Open Sound System audio drivers" +HOMEPAGE="http://developer.opensound.com/" +LICENSE="BSD (2-clause)" +COPYRIGHT="1996-2008 Hannu Savolainen and Dev Mazumdar" +SRC_URI="git://opensound.git.sourceforge.net/gitroot/opensound/opensound" +REVISION="1" +#CHECKSUM_MD5="" +ARCHITECTURES="?x86_gcc2 ?x86" + +PROVIDES=" + opensound$secondaryArchSuffix = $portVersion + cmd:ossplay$secondaryArchSuffix + cmd:ossinfo$secondaryArchSuffix + cmd:ossmix$secondaryArchSuffix + cmd:ossphone$secondaryArchSuffix + cmd:ossrecord$secondaryArchSuffix + cmd:osstest$secondaryArchSuffix + cmd:savemixer$secondaryArchSuffix + cmd:vmixctl$secondaryArchSuffix + " + +REQUIRES=" + haiku$secondaryArchSuffix >= $haikuVersion + " + +BUILD_PREREQUIRES=" + haiku${secondaryArchSuffix}_devel >= $haikuVersion + cmd:gcc$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:make + " + +PATCHES="opensound-4.2_git.patchset" + +GLOBAL_WRITABLE_FILES="settings/kernel/drivers directory keep-old" + +BUILD() +{ + mkdir -p build + cd build + ../configure --config-midi=NO --config-vmix=NO + make +} + +INSTALL() +{ + cd build + make build SYSTEM_DIR=system + copyattr -d -r prototype/system/* $prefix/ + copyattr -d -r prototype/home/config/settings/* $settingsDir/ +} diff --git a/media-sound/opensound/patches/opensound-4.2_git.patchset b/media-sound/opensound/patches/opensound-4.2_git.patchset new file mode 100644 index 000000000..ea93ac167 --- /dev/null +++ b/media-sound/opensound/patches/opensound-4.2_git.patchset @@ -0,0 +1,197 @@ +From f5c773104f0df79a24197a2d66b704c1001ccf6d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= +Date: Sun, 23 Feb 2014 00:30:41 +0100 +Subject: [PATCH 1/5] beos: make sure rejected card isn't uninitialized on + driver unload + +Only mark a card available after having reserved the device in Haiku, +to make sure we don't leave ghost devices. + +diff --git a/kernel/OS/BeOS/os_beos.c b/kernel/OS/BeOS/os_beos.c +index 08587c5..111e6b1 100644 +--- a/kernel/OS/BeOS/os_beos.c ++++ b/kernel/OS/BeOS/os_beos.c +@@ -1057,7 +1057,6 @@ osdev_create (dev_info_t * dip, int dev_type, int instance, const char *nick, + osdev->dip = dip; + //osdev->osid = dip; + osdev->unloaded = 0; +- osdev->available = 1; + osdev->first_mixer = -1; + osdev->instance = instance; + osdev->dev_type = dev_type; +@@ -1096,6 +1095,8 @@ osdev_create (dev_info_t * dip, int dev_type, int instance, const char *nick, + return NULL; + } + ++ osdev->available = 1; ++ + /* + * Create the device handle + */ +-- +1.8.3.4 + + +From e446f041c4dee02c56ad57629861fb1884cf84a8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= +Date: Sun, 23 Feb 2014 01:16:34 +0100 +Subject: [PATCH 2/5] beos: Fix Haiku build + +The spinlock type was changed to a struct so we now use an +initializer macro. + +diff --git a/kernel/OS/BeOS/os_beos.h b/kernel/OS/BeOS/os_beos.h +index 1e8f0b5..31fd27e 100644 +--- a/kernel/OS/BeOS/os_beos.h ++++ b/kernel/OS/BeOS/os_beos.h +@@ -171,6 +171,11 @@ extern int oss_create_uio (uio_t * uiop, char *buf, size_t count, uio_rw_t rw, + * Mutexes + */ + ++/* Haiku defines a specific initializer now, BeOS just used 0. */ ++#ifndef B_INITIALIZE_SPINLOCK ++#define B_INITIALIZE_SPINLOCK(spinlock) do { *spinlock = 0; } while (false) ++#endif ++ + #ifdef MUTEX_CHECKS + /* Debugging version */ + struct _oss_mutex_t +@@ -198,7 +203,7 @@ extern void debug_mutex_exit (oss_mutex_t * mutex, char *file, int line, oss_nat + #define MUTEX_EXIT(mutex, flags) debug_mutex_exit(&mutex, __FILE__, __LINE__, NULL) + #else + typedef spinlock oss_mutex_t; +-#define MUTEX_INIT(osdev, mutex, hier) { mutex = 0; } ++#define MUTEX_INIT(osdev, mutex, hier) B_INITIALIZE_SPINLOCK(&(mutex)) + #define MUTEX_CLEANUP(mutex) + #define MUTEX_ENTER_IRQDISABLE(mutex, flags) \ + { \ +-- +1.8.3.4 + + +From 3686b589095719be3f24b2dd6aea706f9b9a3877 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= +Date: Sun, 23 Feb 2014 01:49:47 +0100 +Subject: [PATCH 3/5] beos: Fix Haiku package + +The kernel library symlink has moved in Haiku, check for it. + +diff --git a/setup/BeOS/build.sh b/setup/BeOS/build.sh +index 045a599..4d10060 100644 +--- a/setup/BeOS/build.sh ++++ b/setup/BeOS/build.sh +@@ -90,16 +90,23 @@ core=prototype/$BEOS_SYSTEM/add-ons/kernel/media/oss + # no midi yet + rm target/modules/oss_midiloop.o + ++for k in /boot/develop/lib/x86/_KERNEL_ /boot/system/develop/lib/_KERNEL_; do ++ if [ -e "$k" ]; then ++ KERNEL="$k" ++ break ++ fi ++done ++ + # try to build all in a single bin for now... + # driver_beos.o shouldn' be in, oh well... + # R5 has symbols like __ucmpdi2 but not Haiku, so use libgcc +-gcc -o $core target/objects/*.o target/modules/*.o -nostdlib -lgcc /boot/develop/lib/x86/_KERNEL_ || exit 1 ++gcc -o $core target/objects/*.o target/modules/*.o -nostdlib -lgcc $KERNEL || exit 1 + setvermime $core + + # except the loader driver... + # using the same bin works in BeOS but not in Haiku. + drv=prototype/$BEOS_SYSTEM/add-ons/kernel/drivers/bin/${DRVPREFIX}loader +-gcc -o $drv target/objects/driver_beos.o -nostdlib /boot/develop/lib/x86/_KERNEL_ || exit 1 ++gcc -o $drv target/objects/driver_beos.o -nostdlib $KERNEL || exit 1 + setvermime $drv + + rm -f devlist.txt +-- +1.8.3.4 + + +From 9af17237da3955bd579a87616d5914d3aa54b435 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= +Date: Sun, 23 Feb 2014 01:51:10 +0100 +Subject: [PATCH 4/5] beos: Avoid loading OSS too early at boot + +Give precedence to the native driver, the /dev symlink was a hack +to force loading OSS earlier than native drivers. + +diff --git a/setup/BeOS/build.sh b/setup/BeOS/build.sh +index 4d10060..ef22ec9 100644 +--- a/setup/BeOS/build.sh ++++ b/setup/BeOS/build.sh +@@ -41,7 +41,9 @@ mkdir -p prototype/$BEOS_SYSTEM/add-ons/kernel/drivers/dev/audio/oss + #hack for now + mkdir -p prototype/$BEOS_SYSTEM/add-ons/kernel/drivers/dev/oss + ln -s ../../bin/${DRVPREFIX}loader prototype/$BEOS_SYSTEM/add-ons/kernel/drivers/dev/oss/ +-ln -s ../bin/${DRVPREFIX}loader prototype/$BEOS_SYSTEM/add-ons/kernel/drivers/dev/ ++# Avoid loading OSS too early at boot, ++# the media addon will probe /dev/audio/oss anyway ++#ln -s ../bin/${DRVPREFIX}loader prototype/$BEOS_SYSTEM/add-ons/kernel/drivers/dev/ + #hack: install bins for now + mkdir -p prototype/home/config/bin + mkdir -p prototype/home/config/settings/kernel/drivers +-- +1.8.3.4 + + +From 288e5eeb0e37b5aae36f31781243769b4e5bed1e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= +Date: Sun, 23 Feb 2014 02:32:05 +0100 +Subject: [PATCH 5/5] beos: Allow installing into passed system directory + +Since Haiku switched to package-management we can provide proper +packages that can be easily uninstalled. +The package will be built by haikuporter though for now. + +diff --git a/setup/BeOS/build.sh b/setup/BeOS/build.sh +index ef22ec9..2fc0cd1 100644 +--- a/setup/BeOS/build.sh ++++ b/setup/BeOS/build.sh +@@ -4,7 +4,9 @@ + + #BEOS_SYSTEM=beos/system + # to install as user addons +-BEOS_SYSTEM=home/config ++BEOS_SYSTEM=${SYSTEM_DIR:-home/config} ++ADDONS_DIR=$BEOS_SYSTEM/add-ons ++BIN_DIR=$BEOS_SYSTEM/bin + + DRVPREFIX=oss_ + +@@ -36,7 +38,6 @@ mkdir -p prototype/$BEOS_SYSTEM/add-ons/kernel/media + #hack for now + #mkdir -p prototype/$BEOS_SYSTEM/add-ons/kernel/media/oss + mkdir -p prototype/$BEOS_SYSTEM/add-ons/kernel/drivers/bin +-mkdir -p prototype/$BEOS_SYSTEM/add-ons/kernel/drivers/dev/audio/multi + mkdir -p prototype/$BEOS_SYSTEM/add-ons/kernel/drivers/dev/audio/oss + #hack for now + mkdir -p prototype/$BEOS_SYSTEM/add-ons/kernel/drivers/dev/oss +@@ -45,9 +46,9 @@ ln -s ../../bin/${DRVPREFIX}loader prototype/$BEOS_SYSTEM/add-ons/kernel/drivers + # the media addon will probe /dev/audio/oss anyway + #ln -s ../bin/${DRVPREFIX}loader prototype/$BEOS_SYSTEM/add-ons/kernel/drivers/dev/ + #hack: install bins for now +-mkdir -p prototype/home/config/bin ++mkdir -p prototype/$BIN_DIR + mkdir -p prototype/home/config/settings/kernel/drivers +-mkdir -p prototype/home/Desktop ++#mkdir -p prototype/home/Desktop + + #cp $SRCDIR/include/soundcard.h prototype/usr/include/sys + +@@ -57,8 +58,8 @@ mkdir -p prototype/home/Desktop + #cp $SRCDIR/kernel/framework/include/midiparser.h prototype/$OSSLIBDIR/include/ + + (cd target/bin; rm -f ossrecord; ln -s ossplay ossrecord) +-cp -f target/bin/* prototype/home/config/bin +-cp -f target/sbin/* prototype/home/config/bin ++cp -f target/bin/* prototype/$BIN_DIR/ ++cp -f target/sbin/* prototype/$BIN_DIR/ + + #cp -R $SRCDIR/oss/* prototype/$OSSLIBDIR + +-- +1.8.3.4 +