summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBuildTools2016-04-30 15:04:55 -0700
committerBuildTools2016-04-30 15:04:55 -0700
commit33d867b5c82110b830cc4bcafca43608003cf34b (patch)
tree454fec2fbd97ce3422b14df8ff882dbd1288b347
downloadaur-33d867b5c82110b830cc4bcafca43608003cf34b.tar.gz
init
-rw-r--r--.SRCINFO20
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD20
-rw-r--r--djgpp-cmake.sh20
-rw-r--r--djgpp-wine.sh20
-rw-r--r--toolchain-djgpp.cmake24
6 files changed, 107 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..f3c60b884ba
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+# Generated by mksrcinfo v8
+# Sat Apr 30 22:04:42 UTC 2016
+pkgbase = djgpp-cmake
+ pkgdesc = CMake wrapper for DJGPP
+ pkgver = 20160430
+ pkgrel = 1
+ url = about:blank
+ arch = any
+ license = GPL
+ depends = cmake
+ depends = djgpp-pkg-config
+ source = djgpp-cmake.sh
+ source = toolchain-djgpp.cmake
+ source = djgpp-wine.sh
+ md5sums = b910a48fb88cffe6204e5d7c1ec09915
+ md5sums = e77375aba6cd293f3f448aea64e6d121
+ md5sums = 63022e5bea39f3851c994c98f3e472be
+
+pkgname = djgpp-cmake
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..f46de972b6f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+pkg/
+src/
+*.xz
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..b77e9e6059e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,20 @@
+pkgname=djgpp-cmake
+pkgver=20160430
+pkgrel=1
+arch=(any)
+pkgdesc="CMake wrapper for DJGPP"
+depends=(cmake djgpp-pkg-config)
+license=("GPL")
+url="about:blank"
+source=("djgpp-cmake.sh"
+"toolchain-djgpp.cmake"
+"djgpp-wine.sh")
+md5sums=('b910a48fb88cffe6204e5d7c1ec09915'
+ 'e77375aba6cd293f3f448aea64e6d121'
+ '63022e5bea39f3851c994c98f3e472be')
+
+package() {
+ install -Dm 644 toolchain-djgpp.cmake "${pkgdir}"/usr/share/djgpp/toolchain-i686-pc-msdosdjgpp.cmake
+ install -Dm 755 djgpp-cmake.sh "${pkgdir}"/usr/bin/i686-pc-msdosdjgpp-cmake
+ install -m 755 djgpp-wine.sh "${pkgdir}"/usr/bin/i686-pc-msdosdjgpp-wine
+}
diff --git a/djgpp-cmake.sh b/djgpp-cmake.sh
new file mode 100644
index 00000000000..c497ef5b96d
--- /dev/null
+++ b/djgpp-cmake.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+djgpp_prefix=/usr/i686-pc-msdosdjgpp
+
+export PKG_CONFIG_LIBDIR="${djgpp_prefix}/lib/pkgconfig"
+
+djgpp_c_flags="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4"
+export CFLAGS="$djgpp_c_flags"
+export CXXFLAGS="$djgpp_c_flags"
+
+PATH=${djgpp_prefix}/bin:$PATH cmake \
+ -DCMAKE_INSTALL_PREFIX:PATH=${djgpp_prefix} \
+ -DCMAKE_INSTALL_LIBDIR:PATH=${djgpp_prefix}/lib \
+ -DINCLUDE_INSTALL_DIR:PATH=${djgpp_prefix}/include \
+ -DLIB_INSTALL_DIR:PATH=${djgpp_prefix}/lib \
+ -DSYSCONF_INSTALL_DIR:PATH=${djgpp_prefix}/etc \
+ -DSHARE_INSTALL_DIR:PATH=${djgpp_prefix}/share \
+ -DBUILD_SHARED_LIBS:BOOL=OFF \
+ -DCMAKE_TOOLCHAIN_FILE=/usr/share/djgpp/toolchain-i686-pc-msdosdjgpp.cmake \
+ -DCMAKE_CROSSCOMPILING_EMULATOR=/usr/bin/i686-pc-msdosdjgpp-wine \
+ "$@"
diff --git a/djgpp-wine.sh b/djgpp-wine.sh
new file mode 100644
index 00000000000..3d6f3df6993
--- /dev/null
+++ b/djgpp-wine.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+set -e
+
+djgpp_prefix=/usr/i686-pc-msdosdjgpp
+
+# run it in a custom WINEPREFIX to not mess with default ~/.wine
+if ! test -d "${WINEPREFIX}"
+then
+ export WINEPREFIX=~/.wine-i686-pc-msdosdjgpp
+fi
+
+# WINEPATH is used to find dlls, otherwise they should lie next to the exe
+if test -z "${WINEPATH}"
+then
+ export WINEPATH=${djgpp_prefix}/bin
+fi
+
+wine "$@"
+
diff --git a/toolchain-djgpp.cmake b/toolchain-djgpp.cmake
new file mode 100644
index 00000000000..72e330d529a
--- /dev/null
+++ b/toolchain-djgpp.cmake
@@ -0,0 +1,24 @@
+set (CMAKE_SYSTEM_NAME pc)
+
+# specify the cross compiler
+set (CMAKE_C_COMPILER i686-pc-msdosdjgpp-gcc)
+set (CMAKE_CXX_COMPILER i686-pc-msdosdjgpp-g++)
+
+# where is the target environment
+set (CMAKE_FIND_ROOT_PATH /usr/i686-pc-msdosdjgpp)
+
+# search for programs in the build host directories
+set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+# for libraries and headers in the target directories
+set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+set (CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
+
+# Make sure Qt can be detected by CMake
+set (QT_BINARY_DIR /usr/i686-pc-msdosdjgpp/bin /usr/bin)
+set (QT_INCLUDE_DIRS_NO_SYSTEM ON)
+
+# These are needed for compiling lapack (RHBZ #753906)
+set (CMAKE_Fortran_COMPILER i686-pc-msdosdjgpp-gfortran)
+set (CMAKE_AR:FILEPATH i686-pc-msdosdjgpp-ar)
+set (CMAKE_RANLIB:FILEPATH i686-pc-msdosdjgpp-ranlib)