Subject: [alpine-devel] [PATCH 1/2] testing/irrlicht: new aport

From: Jeff Bilyk <[email-masked]>
Date: Thu, 17 Mar 2011 06:01:05 +0000

---
 testing/irrlicht/APKBUILD |   73 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 73 insertions(+), 0 deletions(-)
 create mode 100644 testing/irrlicht/APKBUILD

diff --git a/testing/irrlicht/APKBUILD b/testing/irrlicht/APKBUILD
new file mode 100644
index 0000000..8527cfe
--- /dev/null
+++ b/testing/irrlicht/APKBUILD
@@ -0,0 +1,73 @@
+# Contributor:
+# Maintainer:
+pkgname=irrlicht
+pkgver=1.7.2
+pkgrel=0
+pkgdesc="3D graphics engine"
+url="http://irrlicht.sourceforge.net"
+arch="all"
+license="ZLIB"
+depends=
+depends_dev="mesa-dev jpeg-dev bzip2"
+makedepends="$depends_dev"
+install=""
+source="http://downloads.sourceforge.net/irrlicht/irrlicht-$pkgver.zip"
+
+_builddir="$srcdir"/$pkgname-$pkgver/source/Irrlicht
+prepare() {
+	local i
+	cd "$_builddir"
+	for i in $source; do
+		case $i in
+		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+		esac
+	done
+}
+
+build() {
+	cd "$_builddir"
+	make sharedlib
+	make || return 1
+
+	#from arch pkgbuild: example build helper
+	ln -s libIrrlicht.so.$pkgver "$srcdir"/$pkgname-$pkgver/lib/Linux/libIrrlicht.so
+
+	cd ../../examples
+	make || return 1
+}
+
+package() {
+	cd "$_builddir"
+
+	mkdir -p "$pkgdir"/usr/lib
+	mkdir -p "$pkgdir"/usr/share/licenses/$pkgname
+	mkdir -p "$pkgdir"/usr/share/$pkgname/examples/bin
+	mkdir -p "$pkgdir"/usr/share/doc/$pkgname
+	mkdir -p "$pkgdir"/usr/include/$pkgname/include
+	
+	make INSTALL_DIR="$pkgdir" install || return 1
+
+	cd ../..
+	install -m644 readme.txt "$pkgdir"/usr/share/licenses/$pkgname
+
+	#from arch pkgbuild: install static library and fix perms
+	install -m644 lib/Linux/libIrrlicht.a "$pkgdir"/usr/lib
+
+	#from arch pkgbuild: install media file examples
+	cp -r media "$pkgdir"/usr/share/$pkgname
+
+	#from arch pkgbuild: install docs
+	cp -r doc/* "$pkgdir"/usr/share/doc/$pkgname
+	rm -f "$pkgdir"/usr/share/doc/$pkgname/*.txt
+
+	cd "$pkgdir"/usr/lib
+	mv ../../libIrrlicht* ./
+	ln -s libIrrlicht.so.$pkgver libIrrlicht.so.1
+
+	mv "$pkgdir"/../include/* "$pkgdir"/usr/include/$pkgname/include/
+	rm -rf "$pkgdir"/../include/
+	
+	install -m755 "$srcdir"/$pkgname-$pkgver/bin/Linux/* "$pkgdir"/usr/share/$pkgname/examples/bin/
+}
+
+md5sums="eb627d4c432bf73f12bc6d9ddc700b07  irrlicht-1.7.2.zip"
-- 
1.7.4.1

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Jeff Bilyk <[email-masked]>
Date: Thu, 17 Mar 2011 21:49:19 +0000

---
 testing/irrlicht/APKBUILD |   74 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 74 insertions(+), 0 deletions(-)
 create mode 100644 testing/irrlicht/APKBUILD

index 0000000..96442ac
@@ -0,0 +1,74 @@
+# Maintainer: Jeff Bilyk <[email-masked]>
+depends_dev="mesa-dev jpeg-dev bzip2 libpng-dev zlib-dev"
+       make sharedlib || return 1
+       # Fix examples building
+       sed -i '/define USE_IRRKLANG/s:.*://&:' ./Demo/CDemo.h

---

---

From: Jeff Bilyk <[email-masked]>
Date: Thu, 17 Mar 2011 21:49:20 +0000

---
 testing/irrlicht/APKBUILD |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/testing/irrlicht/APKBUILD b/testing/irrlicht/APKBUILD
index 96442ac..6d1405b 100644
--- a/testing/irrlicht/APKBUILD
+++ b/testing/irrlicht/APKBUILD
@@ -1,6 +1,7 @@
 # Maintainer: Jeff Bilyk <[email-masked]>
 pkgname=irrlicht
 pkgver=1.7.2
+_pkgmajver=1.7
 pkgrel=0
 pkgdesc="3D graphics engine"
 url="http://irrlicht.sourceforge.net"
@@ -64,8 +65,10 @@ package() {
        cd "$pkgdir"/usr/lib
        mv ../../libIrrlicht* ./
        ln -s libIrrlicht.so.$pkgver libIrrlicht.so.1
+       ln -s libIrrlicht.so.$pkgver libIrrlicht.so.$_pkgmajver
 
        mv "$pkgdir"/../include/* "$pkgdir"/usr/include/$pkgname/include/
+       mv "$pkgdir"/usr/include/$pkgname/include/irrlicht/* "$pkgdir"/usr/include/$pkgname/include/
        rm -rf "$pkgdir"/../include/
 
        install -m755 "$srcdir"/$pkgname-$pkgver/bin/Linux/* "$pkgdir"/usr/share/$pkgname/examples/bin/
-- 
1.7.4.1

---

---

From: Jeff Bilyk <[email-masked]>
Date: Thu, 17 Mar 2011 21:49:21 +0000

---
 testing/supertuxkart/APKBUILD |   43 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 43 insertions(+), 0 deletions(-)
 create mode 100644 testing/supertuxkart/APKBUILD

diff --git a/testing/supertuxkart/APKBUILD b/testing/supertuxkart/APKBUILD
new file mode 100644
index 0000000..cc47cc6
--- /dev/null
+++ b/testing/supertuxkart/APKBUILD
@@ -0,0 +1,43 @@
+# Maintainer: Jeff Bilyk <[email-masked]>
+pkgname=supertuxkart
+pkgver=0.7
+pkgrel=0
+pkgdesc="Kart racing game"
+url="http://supertuxkart.sourceforge.net"
+arch="x86 x86_64"
+license="GPL"
+depends=
+depends_dev="irrlicht libvorbis-dev libogg-dev openal-soft-dev mesa-dev jpeg-dev gettext-dev"
+makedepends="$depends_dev"
+source="http://downloads.sourceforge.net/project/$pkgname/SuperTuxKart/0.7/$pkgname-$pkgver-src.tar.bz2"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+	local i
+	cd "$_builddir"
+	for i in $source; do
+		case $i in
+			*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+		esac
+	done
+}
+
+build() {
+	cd "$_builddir"
+	./configure --prefix=/usr \
+		--datadir=/usr/share \
+		--bindir=/usr/bin \
+		--with-irrlicht=/usr/include/irrlicht \
+		|| return 1
+	# From arch pkgbuild
+	sed -i "s#/usr/local#/usr#" src/io/file_manager.cpp
+	sed -i "s#/games#/bin#" $(grep -r "/games" *)
+	make || return 1
+}
+
+package() {
+	cd "$_builddir"
+	make DESTDIR="$pkgdir" install || return 1
+}
+md5sums="2806f271e4d37fee5ad8ca166e1ad489  supertuxkart-0.7-src.tar.bz2"
-- 
1.7.4.1

---

---

From: Natanael Copa <[email-masked]>
Date: Sat, 19 Mar 2011 20:10:51 +0100

On Thu, 17 Mar 2011 21:49:19 +0000
Jeff Bilyk <[email-masked]> wrote:

> ---
>  testing/irrlicht/APKBUILD |   74
> +++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 74
> insertions(+), 0 deletions(-) create mode 100644
> testing/irrlicht/APKBUILD

seems like nenolod applied all three.

Thanks!

-nc

---

---

From: Natanael Copa <[email-masked]>
Date: Thu, 17 Mar 2011 14:45:24 +0100

On Thu, 17 Mar 2011 06:01:05 +0000
Jeff Bilyk <[email-masked]> wrote:

> ---
>  testing/irrlicht/APKBUILD |   73
> +++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 73
...
> +makedepends="$depends_dev"

I might be wrong but it looked like you need zlib-dev and libpng-dev in
the makedepends as well.

> +	make sharedlib

I think it needs to be 'make sharedlib || return 1'. I noticed the
build fuilaed at some point (maybe parallell issue) but the package was
build anyways.

Thanks!
-nc

---