summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndris Pavenis2018-05-09 18:54:36 +0300
committerAndris Pavenis2018-05-10 18:45:14 +0300
commit447c4e0d9d03f128946167e243eb578c2e535f73 (patch)
tree2f6f052ab36535971bb0f2414d72e6afd71221cf
downloadaur-447c4e0d9d03f128946167e243eb578c2e535f73.tar.gz
Initial version of package
-rw-r--r--.SRCINFO25
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD80
-rw-r--r--dxegen.patch36
4 files changed, 145 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..05368bf060e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,25 @@
+pkgbase = djgpp-djcrx-cvs
+ pkgdesc = Headers and utilities for the djgpp cross-compiler (development version)
+ pkgver = 2.06.cvs20180509
+ pkgrel = 1
+ url = http://www.delorie.com/djgpp/
+ arch = i686
+ arch = x86_64
+ license = GPL
+ license = LGPL
+ license = custom:djgpp
+ makedepends = djgpp-gcc
+ makedepends = djgpp-binutils
+ makedepends = cvs
+ depends = glibc
+ depends = gcc-libs
+ provides = djgpp-djcrx
+ conflicts = djgpp-djcrx-bootstrap
+ conflicts = djgpp-djcrx
+ options = !buildflags
+ options = !strip
+ source = dxegen.patch
+ sha256sums = 0debe0161e27aeb004e89a43915d6d77bcd07a5db2c67e2798568535fe9143f1
+
+pkgname = djgpp-djcrx-cvs
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..09a28d69c57
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/pkg
+/src
+djgpp-djcrx-cvs-*.pkg.tar.xz
+*~
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..8a001a12a30
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,80 @@
+# Maintainer: Andris Pavenis <andris.pavenis iki fi>
+
+pkgname=djgpp-djcrx-cvs
+pkgver=2.06.cvs20180509
+pkgrel=1
+pkgdesc="Headers and utilities for the djgpp cross-compiler (development version)"
+arch=('i686' 'x86_64')
+url="http://www.delorie.com/djgpp/"
+depends=('glibc' 'gcc-libs')
+provides=('djgpp-djcrx')
+conflicts=('djgpp-djcrx-bootstrap' 'djgpp-djcrx')
+license=('GPL' 'LGPL' 'custom:djgpp')
+source=('dxegen.patch')
+makedepends=('djgpp-gcc' 'djgpp-binutils' 'cvs')
+sha256sums=('0debe0161e27aeb004e89a43915d6d77bcd07a5db2c67e2798568535fe9143f1')
+options=('!buildflags' '!strip')
+_target='i686-pc-msdosdjgpp'
+_cvsroot=':pserver:anonymous:anonymous@cvs.delorie.com:/cvs/djgpp'
+_cvsmod='djgpp'
+
+pkgver() {
+ date '+2.06.cvs%Y%m%d'
+}
+
+prepare() {
+ _top=$(pwd)
+ if [ -d ${_cvsmod}/CVS ] ; then
+ cd $_cvsmod
+ cvs -z3 -q -d ${_cvsroot} update -d
+ else
+ cvs -z3 -q -d ${_cvsroot} co -f ${_cvsmod}
+ fi
+ cd ${_top}
+
+ rm -rf ${srcdir}/${_cvsmod}.build
+ cp -r ${_cvsmod} ${srcdir}/${_cvsmod}.build
+
+ cd ${srcdir}/${_cvsmod}.build
+ patch -Np0 <${srcdir}/dxegen.patch
+ }
+
+ build() {
+ cd ${srcdir}/${_cvsmod}.build/src
+ make -j1 CROSS_PREFIX=${_target}-
+
+ cd dxe
+ make -f makefile.dxe CROSS_PREFIX=${_target}-
+}
+
+package() {
+ cd ${srcdir}/${_cvsmod}.build
+ pwd
+ install -d "$pkgdir"/usr/bin
+ install -d "$pkgdir"/usr/$_target/bin
+ install -d "$pkgdir"/usr/$_target/sys-include
+
+ cp -r include/* "$pkgdir"/usr/$_target/sys-include
+ cp -r lib "$pkgdir"/usr/$_target
+
+ cd hostbin
+ for _file in djasm mkdoc stubedit stubify; do
+ install -m0755 $_file.exe "$pkgdir"/usr/$_target/bin/$_file
+ ln -s ../$_target/bin/$_file "$pkgdir"/usr/bin/$_target-$_file
+ done
+
+ cd ../src/dxe
+ for _file in dxe3gen dxe3res; do
+ install -m0755 $_file "$pkgdir"/usr/$_target/bin/$_file
+ ln -s ../$_target/bin/$_file "$pkgdir"/usr/bin/$_target-$_file
+ done
+ ln -s dxe3gen "$pkgdir"/usr/$_target/bin/dxegen
+
+ cd ${srcdir}/${_cvsmod}.build
+ install -Dm644 copying.dj "$pkgdir"/usr/share/licenses/$pkgname/copying.dj
+
+ cd info
+ for _file in *.info; do
+ install -Dm0644 $_file "$pkgdir"/usr/share/info/djgpp-$_file
+ done
+}
diff --git a/dxegen.patch b/dxegen.patch
new file mode 100644
index 00000000000..24b1968b316
--- /dev/null
+++ b/dxegen.patch
@@ -0,0 +1,36 @@
+--- src/dxe/dxegen.c
++++ src/dxe/dxegen.c
+@@ -106,8 +106,7 @@
+ libdir = getenv("DJDIR");
+ if (!libdir)
+ {
+- fprintf(stderr, "Error: neither DXE_LD_LIBRARY_PATH nor DJDIR are set in environment\n");
+- exit(1);
++ libdir = "/usr/i686-pc-msdosdjgpp";
+ }
+ strcat(command, libdir);
+ strcat(command, "/lib");
+--- src/dxe/dxe3gen.c
++++ src/dxe/dxe3gen.c
+@@ -461,7 +461,7 @@
+ canonicalize_path(libdir);
+ }
+ else
+- libdir = NULL;
++ libdir = strdup("/usr/i686-pc-msdosdjgpp/lib");
+ }
+
+
+@@ -1366,7 +1366,11 @@
+ if (opt.autoresolve)
+ {
+ /* Fire the resolver. It should take care of the dependencies (if any) */
+- strcpy(cmdbuf, "dxe3res -o "TEMP_BASE".c ");
++ const char *djdir = getenv("DJDIR");
++ if (!djdir)
++ djdir = "/usr/i686-pc-msdosdjgpp";
++ strcpy(cmdbuf, djdir);
++ strcat(cmdbuf, "/bin/dxe3res -o "TEMP_BASE".c ");
+ strcat(cmdbuf, opt.dxefile);
+ if ((rv = system(cmdbuf)) != 0)
+ {