diff options
author | Uffe Jakobsen | 2016-11-10 22:53:18 +0100 |
---|---|---|
committer | Uffe Jakobsen | 2016-11-10 22:53:18 +0100 |
commit | 0f22595915bca9af0ad6bd1d452099134f5677f1 (patch) | |
tree | 6460f147c648b9a9233e7dce570086d858961109 | |
download | aur-0f22595915bca9af0ad6bd1d452099134f5677f1.tar.gz |
Initial
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | PKGBUILD | 67 | ||||
-rw-r--r-- | makefile.all.djgpp.patch | 132 | ||||
-rw-r--r-- | makefile.dj.djgpp.patch | 136 | ||||
-rw-r--r-- | misc_mdhelper_sh.djgpp.patch | 11 |
5 files changed, 365 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..ddc6c637909b --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +# Generated by mksrcinfo v8 +# Thu Nov 10 21:41:00 UTC 2016 +pkgbase = djgpp-allegro4 + pkgdesc = Allegro... + pkgver = 4.2.3.1 + pkgrel = 1 + url = http://liballeg.org/old.html + arch = i686 + arch = x86_64 + license = custom + makedepends = djgpp-gcc + depends = ncurses + depends = libusb + depends = libusb-compat + source = http://download.gna.org/allegro/allegro/4.2.3.1/allegro-4.2.3.1.tar.gz + md5sums = 92b0af3cccc5f3b4c3c1aad69a32baa9 + +pkgname = djgpp-allegro4 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..5e26c4a8fc82 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,67 @@ +# +# PKGBUILD for djgpp-allegro4 +# +# Contributor: Uffe Jakobsen <uffe@uffe.org> +# Maintainer: Uffe Jakobsen <uffe@uffe.org> +# + +_pkgname=allegro +_pkgver=4.2.3.1 + +pkgname=djgpp-allegro4 +pkgver=${_pkgver} +pkgrel=1 +epoch= +pkgdesc="Allegro..." +arch=('i686' 'x86_64') +url="http://liballeg.org/old.html" +license=('custom') +groups=() +depends=('ncurses' 'libusb' 'libusb-compat') +makedepends=('djgpp-gcc') +checkdepends=() +optdepends=() +provides=() +conflicts=() +replaces=() +backup=() +options=() +install= +changelog= +noextract=() +source=(http://download.gna.org/allegro/allegro/4.2.3.1/allegro-4.2.3.1.tar.gz) +md5sums=('92b0af3cccc5f3b4c3c1aad69a32baa9') + +#_architectures="i686-w64-mingw32 x86_64-w64-mingw32" +_target="i686-pc-msdosdjgpp" + +_pkgsrcdir="${_pkgname}-${pkgver}" + +prepare() { + cd "${srcdir}/${_pkgsrcdir}" + + patch -p0 < ${startdir}/makefile.all.djgpp.patch + patch -p0 < ${startdir}/makefile.dj.djgpp.patch + patch -p0 < ${startdir}/misc_mdhelper_sh.djgpp.patch + + sh ./fix.sh djgpp --quick +} + +build() { + cd "${srcdir}/${_pkgsrcdir}" + + make CROSSCOMPILE=1 UNIX_TOOLS=1 XPREFIX="${_target}-" DJDIR="/usr/${_target}" INSTALLDIR="${pkgdir}/usr/${_target}" lib + +} + +check() { + cd "${srcdir}/${_pkgsrcdir}" +} + +package() { + cd "${srcdir}/${_pkgsrcdir}" + make CROSSCOMPILE=1 UNIX_TOOLS=1 XPREFIX="${_target}-" DJDIR="/usr/${_target}" INSTALLDIR="${pkgdir}/usr/${_target}" install + mkdir -p "${pkgdir}/usr/share/licenses/${pkgname}" +} + +# EOF diff --git a/makefile.all.djgpp.patch b/makefile.all.djgpp.patch new file mode 100644 index 000000000000..106c3cabc5ba --- /dev/null +++ b/makefile.all.djgpp.patch @@ -0,0 +1,132 @@ +--- makefile.all.orig 2016-11-05 12:35:15.189884554 +0100 ++++ makefile.all 2016-11-06 23:45:20.649345515 +0100 +@@ -234,32 +234,40 @@ + + # -------- rules for deleting the generated files -------- + +-clean: +-ifdef UNIX_TOOLS +- -rm $(RM_OPTS) $(OBJ_CLEAN_FILES) +- -rm $(RM_OPTS) $(OTHER_CLEAN_FILES) +-else ++ ++ifndef UNIX_TOOLS + define RM_CLEAN + $(foreach file, $(wildcard $(OBJ_CLEAN_FILES)), -del $(subst /,\,$(file)) + ) + $(foreach file, $(wildcard $(OTHER_CLEAN_FILES)), -del $(subst /,\,$(file)) + ) + endef +- -$(RM_CLEAN) + endif + +-distclean: clean ++clean: + ifdef UNIX_TOOLS +- -rm $(RM_OPTS) $(DISTCLEAN_FILES) ++ -rm $(RM_OPTS) $(OBJ_CLEAN_FILES) ++ -rm $(RM_OPTS) $(OTHER_CLEAN_FILES) + else ++ -$(RM_CLEAN) ++endif ++ ++ ++ifndef UNIX_TOOLS + define RM_DISTCLEAN + $(foreach file, $(wildcard $(DISTCLEAN_FILES)), -del $(subst /,\,$(file)) + ) + endef ++endif ++ ++distclean: clean ++ifdef UNIX_TOOLS ++ -rm $(RM_OPTS) $(DISTCLEAN_FILES) ++else + -$(RM_DISTCLEAN) + endif + +-veryclean: distclean ++ + ifdef UNIX_TOOLS + -rm $(RM_OPTS) $(VERYCLEAN_FILES) + else +@@ -267,6 +275,12 @@ + $(foreach file, $(wildcard $(VERYCLEAN_FILES)), -del $(subst /,\,$(file)) + ) + endef ++endif ++ ++veryclean: distclean ++ifdef UNIX_TOOLS ++ -rm $(RM_OPTS) $(VERYCLEAN_FILES) ++else + -$(RM_VERYCLEAN) + endif + +@@ -292,15 +306,19 @@ + INSTALL_DIRS := $(subst /,$(strip \),$(INSTALL_DIRS)) + endif + +-create-install-dirs: +-ifdef UNIX_TOOLS +- misc/mdhelper.sh $(INSTALL_DIRS) +-else ++ ++ifndef UNIX_TOOLS + define MKDIRS + $(foreach dir,$(INSTALL_DIRS),\ + misc\mdhelper.bat $(dir) + ) + endef ++endif ++ ++create-install-dirs: ++ifdef UNIX_TOOLS ++ misc/mdhelper.sh $(INSTALL_DIRS) ++else + $(MKDIRS) + endif + +@@ -378,6 +396,14 @@ + $(INSTALLDIR_U)/$(INCDIR_U)/allegro/internal/*.h \ + ) + ++ ++ifndef UNIX_TOOLS ++ define RM_FILES ++ $(foreach file, $(UNINSTALL_FILES), del $(subst /,\,$(file)) ++ ) ++ endef ++endif ++ + generic-uninstall: + ifdef UNIX_TOOLS + -rm -fv $(UNINSTALL_FILES) +@@ -386,10 +412,6 @@ + -rmdir $(INSTALLDIR_U)/$(INCDIR_U)/allegro/internal + -rmdir $(INSTALLDIR_U)/$(INCDIR_U)/allegro + else +- define RM_FILES +- $(foreach file, $(UNINSTALL_FILES), del $(subst /,\,$(file)) +- ) +- endef + -$(RM_FILES) + -rd $(INSTALLDIR_D)\$(INCDIR_D)\allegro\platform + -rd $(INSTALLDIR_D)\$(INCDIR_D)\allegro\inline +@@ -468,8 +490,11 @@ + + ifdef INFO + ++ifndef CROSSCOMPILE ++ + $(filter %.$(TEXI),$(DOCS)): docs/texi/%.$(TEXI): docs/src/%._tx $(MAKEDOC) + $(MAKEDOC) -$(TEXI) $@ $< ++endif + + $(filter %.$(INFO),$(DOCS)): docs/info/%.$(INFO): docs/texi/%.$(TEXI) $(MAKEDOC) + -makeinfo --no-split -o $@ $< +@@ -590,4 +615,3 @@ + # -------- automatic source dependencies -------- + + -include $(OBJ_DIR)/makefile.dep +- diff --git a/makefile.dj.djgpp.patch b/makefile.dj.djgpp.patch new file mode 100644 index 000000000000..808f0e2996ee --- /dev/null +++ b/makefile.dj.djgpp.patch @@ -0,0 +1,136 @@ +--- makefile.dj.orig 2016-11-05 12:51:42.412366330 +0100 ++++ makefile.dj 2016-11-10 22:36:15.464658620 +0100 +@@ -14,6 +14,7 @@ + CC = gcc + EXE = .exe + OBJ = .o ++AR = ar + + PLATFORM_DIR = obj/djgpp + +@@ -22,9 +23,11 @@ + + ifdef CROSSCOMPILE + UNIX_TOOLS = 1 ++ CC = $(XPREFIX)gcc ++ AR = $(XPREFIX)ar + endif + +-ifneq (,$(findstring bash,$(SHELL))) ++ifneq (,$(findstring sh,$(basename $(SHELL)))) + UNIX_TOOLS = 1 + endif + +@@ -184,6 +187,15 @@ + OFLAGS = $(TARGET_ARCH) $(TARGET_OPTS) + + CFLAGS = -DALLEGRO_LIB_BUILD ++CFLAGS += -fgnu89-inline ++ ++#CFLAGS += -L/usr/i686-pc-msdosdjgpp/lib -llibc ++#CFLAGS += -I/usr/i686-pc-msdosdjgpp/include ++ ++#CFLAGS += -isystem /usr/i686-pc-msdosdjgpp/include ++CFLAGS += --sysroot /usr/i686-pc-msdosdjgpp ++CFLAGS += -isystem /usr/i686-pc-msdosdjgpp/include ++CFLAGS += -isysroot /usr/i686-pc-msdosdjgpp/include + + + +@@ -247,53 +259,56 @@ + + # -------- rules for installing and removing the library files -------- + +-INSTALLDIR = $(DJDIR_U) ++INSTALLDIR ?= $(DJDIR_U) + LIBDIR = lib + INCDIR = include + + ifdef UNIX_TOOLS + +-$(DJDIR_U)/lib/lib$(VERSION).a: $(LIB_NAME) $(DJDIR_U)/lib +- cp lib/djgpp/lib$(VERSION).a $(DJDIR_U)/lib ++$(INSTALLDIR)/lib/lib$(VERSION).a: $(LIB_NAME) $(INSTALLDIR)/lib ++ cp lib/djgpp/lib$(VERSION).a $(INSTALLDIR)/lib + +-$(DJDIR_U)/info/allegro.$(INFO): docs/info/allegro.$(INFO) +- -cp docs/info/allegro.$(INFO) $(DJDIR_U)/info +- -install-info $(DJDIR_U)/info/allegro.$(INFO) $(DJDIR_U)/info/dir ++$(INSTALLDIR)/info/allegro.$(INFO): docs/info/allegro.$(INFO) ++ -cp docs/info/allegro.$(INFO) $(INSTALLDIR)/info ++ -install-info $(INSTALLDIR)/info/allegro.$(INFO) $(INSTALLDIR)/info/dir + + else + +-$(DJDIR_U)/lib/lib$(VERSION).a: $(LIB_NAME) ++$(INSTALLDIR)/lib/lib$(VERSION).a: $(LIB_NAME) + copy lib\djgpp\lib$(VERSION).a $(DJDIR_D)\lib + +-$(DJDIR_U)/info/allegro.$(INFO): docs/info/allegro.$(INFO) ++$(INSTALLDIR)/info/allegro.$(INFO): docs/info/allegro.$(INFO) + -copy docs\info\allegro.$(INFO) $(DJDIR_D)\info +- -install-info $(DJDIR_U)/info/allegro.$(INFO) $(DJDIR_U)/info/dir ++ -install-info $(INSTALLDIR)/info/allegro.$(INFO) $(INSTALLDIR)/info/dir + + endif + + +-HEADERS = $(DJDIR_U)/include/allegro/platform/aintdos.h \ +- $(DJDIR_U)/include/allegro/platform/al386gcc.h \ +- $(DJDIR_U)/include/allegro/platform/aldjgpp.h \ +- $(DJDIR_U)/include/allegro/platform/alplatf.h \ +- $(DJDIR_U)/include/allegro/platform/astdint.h \ +- $(DJDIR_U)/include/allegro/platform/aldos.h ++HEADERS = $(INSTALLDIR)/include/allegro/platform/aintdos.h \ ++ $(INSTALLDIR)/include/allegro/platform/al386gcc.h \ ++ $(INSTALLDIR)/include/allegro/platform/aldjgpp.h \ ++ $(INSTALLDIR)/include/allegro/platform/alplatf.h \ ++ $(INSTALLDIR)/include/allegro/platform/astdint.h \ ++ $(INSTALLDIR)/include/allegro/platform/aldos.h + +-INSTALL_FILES = $(DJDIR_U)/lib/lib$(VERSION).a \ +- $(DJDIR_U)/info/allegro.$(INFO) \ ++INSTALL_FILES = $(INSTALLDIR)/lib/lib$(VERSION).a \ + $(HEADERS) + ++ifndef CROSSCOMPILE ++INSTALL_FILES += $(INSTALLDIR)/info/allegro.$(INFO) ++endif ++ + install: generic-install + @echo The $(DESCRIPTION) $(PLATFORM) library has been installed. + +-UNINSTALL_FILES = $(DJDIR_U)/lib/liballeg.a \ +- $(DJDIR_U)/lib/liballd.a \ +- $(DJDIR_U)/lib/liballp.a \ +- $(DJDIR_U)/info/allegro.$(INFO) \ ++UNINSTALL_FILES = $(INSTALLDIR)/lib/liballeg.a \ ++ $(INSTALLDIR)/lib/liballd.a \ ++ $(INSTALLDIR)/lib/liballp.a \ ++ $(INSTALLDIR)/info/allegro.$(INFO) \ + $(HEADERS) + + uninstall: generic-uninstall +- -install-info --delete $(DJDIR_U)/info/allegro.$(INFO) $(DJDIR_U)/info/dir ++ -install-info --delete $(INSTALLDIR)/info/allegro.$(INFO) $(INSTALLDIR)/info/dir + @echo All gone! + + +@@ -330,7 +345,7 @@ + # -------- finally, we get to the fun part... -------- + + define MAKE_LIB +- ar rs $(LIB_NAME) $(OBJECTS) ++ $(AR) rs $(LIB_NAME) $(OBJECTS) + endef + + COMPILE_FLAGS = $(subst src/,-DALLEGRO_SRC ,$(findstring src/, $<))$(CFLAGS) +@@ -409,7 +424,7 @@ + endif + + define MAKE_PLUGIN_LIB +- ar rs $(PLUGIN_LIB) $(PLUGIN_OBJS) ++ $(AR) rs $(PLUGIN_LIB) $(PLUGIN_OBJS) + endef + + define LINK_WITH_PLUGINS diff --git a/misc_mdhelper_sh.djgpp.patch b/misc_mdhelper_sh.djgpp.patch new file mode 100644 index 000000000000..79a63240461a --- /dev/null +++ b/misc_mdhelper_sh.djgpp.patch @@ -0,0 +1,11 @@ +--- ./misc/mdhelper.sh.orig 2016-11-06 23:31:58.528148062 +0100 ++++ ./misc/mdhelper.sh 2016-11-06 23:32:00.188171030 +0100 +@@ -3,7 +3,7 @@ + + for dir in $*; do + if [ ! -d "$dir" ]; then +- mkdir $dir ++ mkdir -p $dir + if [ $? != 0 ]; then + exit 1 + fi |