From: Elan Ruusamäe Date: Sun, 25 Nov 2012 13:52:11 +0000 (+0200) Subject: new, version 0.1.98 svn r2537 X-Git-Tag: auto/th/kBuild-0.1.98-3.r1~2 X-Git-Url: https://git.pld-linux.org/?p=packages%2FkBuild.git;a=commitdiff_plain;h=7395c18c482a188e49ed7ba3b49e46dfb399b0cb new, version 0.1.98 svn r2537 based on fedora package --- 7395c18c482a188e49ed7ba3b49e46dfb399b0cb diff --git a/kBuild-0.1.3-escape.patch b/kBuild-0.1.3-escape.patch new file mode 100644 index 0000000..5a708aa --- /dev/null +++ b/kBuild-0.1.3-escape.patch @@ -0,0 +1,17 @@ +This is so that we can pass the command argument with spaces. +Note that this is not really portable, $@ is a bashism, and +traditional shell does not have a suitable replacement. + +Lubomir Rintel + +--- kBuild-0.1.3/kBuild/env.sh.escape 2008-08-17 21:13:20.000000000 +0200 ++++ kBuild-0.1.3/kBuild/env.sh 2008-08-17 21:13:23.000000000 +0200 +@@ -568,7 +568,7 @@ + MY_RC=$? + else + test -z "${QUIET_OPT}" && echo "$0: info: Executing command: $*" 1>&${ERR_REDIR} +- $* ++ "$@" + MY_RC=$? + test -z "${QUIET_OPT}" -a "$MY_RC" -ne 0 && echo "$0: info: rc=$MY_RC: $*" 1>&${ERR_REDIR} + fi diff --git a/kBuild-0.1.5-dprintf.patch b/kBuild-0.1.5-dprintf.patch new file mode 100644 index 0000000..58887f4 --- /dev/null +++ b/kBuild-0.1.5-dprintf.patch @@ -0,0 +1,38 @@ +This dprintf() collides with POSIX.1-2008 dprintf() and is not used at all +anyways. (Whoa! what a stupid name! standardized before invention of grep!) + +Lubomir Rintel + +diff -up kBuild-0.1.5/src/ash/output.c.gcc44 kBuild-0.1.5/src/ash/output.c +--- kBuild-0.1.5/src/ash/output.c.gcc44 2009-04-13 01:20:33.857017054 +0200 ++++ kBuild-0.1.5/src/ash/output.c 2009-04-13 01:20:57.570033297 +0200 +@@ -230,6 +230,7 @@ out1fmt(const char *fmt, ...) + va_end(ap); + } + ++#if 0 + void + dprintf(const char *fmt, ...) + { +@@ -240,6 +241,7 @@ dprintf(const char *fmt, ...) + va_end(ap); + flushout(out2); + } ++#endif + + void + fmtstr(char *outbuf, size_t length, const char *fmt, ...) +diff -up kBuild-0.1.5/src/ash/output.h.gcc44 kBuild-0.1.5/src/ash/output.h +--- kBuild-0.1.5/src/ash/output.h.gcc44 2009-04-13 01:20:37.724140366 +0200 ++++ kBuild-0.1.5/src/ash/output.h 2009-04-13 01:20:47.933142098 +0200 +@@ -65,8 +65,10 @@ void outfmt(struct output *, const char + __attribute__((__format__(__printf__,2,3))); + void out1fmt(const char *, ...) + __attribute__((__format__(__printf__,1,2))); ++#if 0 + void dprintf(const char *, ...) + __attribute__((__format__(__printf__,1,2))); ++#endif + void fmtstr(char *, size_t, const char *, ...) + __attribute__((__format__(__printf__,3,4))); + void doformat(struct output *, const char *, va_list); diff --git a/kBuild-0.1.5-pthread.patch b/kBuild-0.1.5-pthread.patch new file mode 100644 index 0000000..01d6602 --- /dev/null +++ b/kBuild-0.1.5-pthread.patch @@ -0,0 +1,12 @@ +diff -up kBuild-0.1.5-p1/Config.kmk.pthreads kBuild-0.1.5-p1/Config.kmk +--- kBuild-0.1.5-p1/Config.kmk.pthreads 2010-02-18 08:27:24.287688965 +0100 ++++ kBuild-0.1.5-p1/Config.kmk 2010-02-18 08:28:07.505493345 +0100 +@@ -282,6 +282,8 @@ ifndef TEMPLATE_BIN_TOOL + endif + ifeq ($(KBUILD_TARGET),linux) + TEMPLATE_BIN_LIBS += rt ++ TEMPLATE_BIN_LIBS += pthread ++ TEMPLATE_BIN_LDFLAGS += -Wl,--as-needed + endif + TEMPLATE_BIN_CFLAGS.x86 += -m32 + TEMPLATE_BIN_CFLAGS.sparc32 += -m32 diff --git a/kBuild.spec b/kBuild.spec new file mode 100644 index 0000000..e2540b4 --- /dev/null +++ b/kBuild.spec @@ -0,0 +1,127 @@ +%define patchlevel r1 +Summary: A cross-platform build environment +Name: kBuild +Version: 0.1.98 +Release: 3%{?patchlevel:.%{patchlevel}} +Group: Development/Tools +# Most tools are from NetBSD, some are from FreeBSD, and make and sed are from GNU +License: BSD and GPL v2+ +URL: http://svn.netlabs.org/kbuild +#Source0: ftp://ftp.netlabs.org/pub/kbuild/%{name}-%{version}%{?patchlevel:-%{patchlevel}}-src.tar.gz +# svn co -e2537 http://svn.netlabs.org/repos/kbuild/trunk@2537 kBuild +# tar czf kBuild-r2537.tar.gz --exclude .svn kBuild +Source0: %{name}-r2537.tar.gz +Patch0: %{name}-0.1.3-escape.patch +Patch1: %{name}-0.1.5-dprintf.patch +Patch2: %{name}-0.1.5-pthread.patch +BuildRequires: acl-devel +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: byacc +BuildRequires: cvs +BuildRequires: flex +BuildRequires: gettext-devel +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%description +This is a GNU make fork with a set of scripts to simplify complex +tasks and portable versions of various UNIX tools to ensure +cross-platform portability. + +It is used mainly to build VirtualBox OSE packages for RPM Fusion +repository. + +%prep +%setup -q -n %{name} +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 + +# Remove prebuilt stuff +rm -rf kBuild/bin/* + +# The bootstrap would probably not be needed if we depended on ourselves, +# yet it is not guarranteed that new versions are compilable with older +# kmk versions, so with this we are on a safer side +find -name config.log -delete + +%build +%define bootstrap_mflags %{_smp_mflags} \\\ + CFLAGS="%{optflags}" \\\ + KBUILD_VERBOSE=2 \\\ + KBUILD_VERSION_PATCH=999 + +%define mflags %{bootstrap_mflags} \\\ + NIX_INSTALL_DIR=%{_prefix} \\\ + BUILD_TYPE=release \\\ + MY_INST_MODE=0644 \\\ + MY_INST_BIN_MODE=0755 + +cd src/kmk +%{__libtoolize} +%{__aclocal} -I config +%{__autoconf} +%{__autoheader} +%{__automake} +cd - + +kBuild/env.sh --full \ + %{__make} -f bootstrap.gmk %{bootstrap_mflags} + +kBuild/env.sh kmk %{mflags} rebuild + +%install +rm -rf $RPM_BUILD_ROOT +export KBUILD_VERBOSE=2 +kBuild/env.sh kmk %{mflags} install \ + PATH_INS=$RPM_BUILD_ROOT + +# These are included later in files section +%{__rm} -r $RPM_BUILD_ROOT%{_docdir} + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(644,root,root,755) +%doc COPYING ChangeLog +%doc kBuild/doc/COPYING-FDL-1.3 kBuild/doc/QuickReference* +%attr(755,root,root) %{_bindir}/kDepIDB +%attr(755,root,root) %{_bindir}/kDepObj +%attr(755,root,root) %{_bindir}/kDepPre +%attr(755,root,root) %{_bindir}/kObjCache +%attr(755,root,root) %{_bindir}/kmk +%attr(755,root,root) %{_bindir}/kmk_append +%attr(755,root,root) %{_bindir}/kmk_ash +%attr(755,root,root) %{_bindir}/kmk_cat +%attr(755,root,root) %{_bindir}/kmk_chmod +%attr(755,root,root) %{_bindir}/kmk_cmp +%attr(755,root,root) %{_bindir}/kmk_cp +%attr(755,root,root) %{_bindir}/kmk_echo +%attr(755,root,root) %{_bindir}/kmk_expr +%attr(755,root,root) %{_bindir}/kmk_gmake +%attr(755,root,root) %{_bindir}/kmk_install +%attr(755,root,root) %{_bindir}/kmk_ln +%attr(755,root,root) %{_bindir}/kmk_md5sum +%attr(755,root,root) %{_bindir}/kmk_mkdir +%attr(755,root,root) %{_bindir}/kmk_mv +%attr(755,root,root) %{_bindir}/kmk_printf +%attr(755,root,root) %{_bindir}/kmk_redirect +%attr(755,root,root) %{_bindir}/kmk_rm +%attr(755,root,root) %{_bindir}/kmk_rmdir +%attr(755,root,root) %{_bindir}/kmk_sed +%attr(755,root,root) %{_bindir}/kmk_sleep +%attr(755,root,root) %{_bindir}/kmk_test +%attr(755,root,root) %{_bindir}/kmk_time +%dir %{_datadir}/%{name} +%{_datadir}/%{name}/*.kmk +%dir %{_datadir}/%{name}/msgstyles +%{_datadir}/%{name}/msgstyles/*.kmk +%dir %{_datadir}/%{name}/sdks +%{_datadir}/%{name}/sdks/*.kmk +%dir %{_datadir}/%{name}/templates +%{_datadir}/%{name}/templates/*.kmk +%dir %{_datadir}/%{name}/tools +%{_datadir}/%{name}/tools/*.kmk +%dir %{_datadir}/%{name}/units +%{_datadir}/%{name}/units/*.kmk