aboutsummaryrefslogtreecommitdiff
path: root/devel/stormlib-ghost++
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2011-02-14 03:24:48 +0000
committerMartin Wilke <miwi@FreeBSD.org>2011-02-14 03:24:48 +0000
commit6c94190e92fc8f20427c0345b7a97b0e2bb2e897 (patch)
treeeffe4b40c58c7535ff09556f47e65d6cf2ae6dac /devel/stormlib-ghost++
parentf405918b9628c74cefec61f169453072cb889aa6 (diff)
downloadports-6c94190e92fc8f20427c0345b7a97b0e2bb2e897.tar.gz
ports-6c94190e92fc8f20427c0345b7a97b0e2bb2e897.zip
The StormLib library is a pack of modules, written in C++,
which are able to read and also to write files from/to the MPQ archives. WWW: https://code.google.com/p/ghostplusplus/ PR: ports/154763 Submitted by: ports@c0decafe.net
Notes
Notes: svn path=/head/; revision=269119
Diffstat (limited to 'devel/stormlib-ghost++')
-rw-r--r--devel/stormlib-ghost++/Makefile29
-rw-r--r--devel/stormlib-ghost++/distinfo2
-rw-r--r--devel/stormlib-ghost++/files/patch-Makefile31
-rw-r--r--devel/stormlib-ghost++/files/patch-StormPortLinux.cpp37
-rw-r--r--devel/stormlib-ghost++/pkg-descr4
-rw-r--r--devel/stormlib-ghost++/pkg-plist4
6 files changed, 107 insertions, 0 deletions
diff --git a/devel/stormlib-ghost++/Makefile b/devel/stormlib-ghost++/Makefile
new file mode 100644
index 000000000000..d97df7b6ae11
--- /dev/null
+++ b/devel/stormlib-ghost++/Makefile
@@ -0,0 +1,29 @@
+# New ports collection makefile for: stormlib
+# Date created: 2011-02-13
+# Whom: <ports@c0decafe.net>
+#
+# $FreeBSD$
+#
+
+PORTNAME= stormlib
+PORTVERSION= 6.25
+CATEGORIES= devel archivers
+MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE}
+PKGNAMESUFFIX= -ghost++
+DISTNAME= ${PROJECTHOST}_${PROJECTVERSION}
+
+MAINTAINER= ports@c0decafe.net
+COMMENT= C++ library to read and write MPQ archives
+
+PROJECTHOST= ghostplusplus
+PROJECTVERSION= 17.1
+
+USE_ZIP= yes
+USE_DOS2UNIX= yes
+
+WRKSRC= ${WRKDIR}/ghost/StormLib/stormlib
+
+USE_GMAKE= yes
+USE_LDCONFIG= yes
+
+.include <bsd.port.mk>
diff --git a/devel/stormlib-ghost++/distinfo b/devel/stormlib-ghost++/distinfo
new file mode 100644
index 000000000000..054048c876d4
--- /dev/null
+++ b/devel/stormlib-ghost++/distinfo
@@ -0,0 +1,2 @@
+SHA256 (ghostplusplus_17.1.zip) = bd4acc61ab553213cb39e6a465b38d1ea7a5b9b4ca2b54fa7e082766b98c729f
+SIZE (ghostplusplus_17.1.zip) = 6720401
diff --git a/devel/stormlib-ghost++/files/patch-Makefile b/devel/stormlib-ghost++/files/patch-Makefile
new file mode 100644
index 000000000000..70d7ffe25c02
--- /dev/null
+++ b/devel/stormlib-ghost++/files/patch-Makefile
@@ -0,0 +1,31 @@
+--- Makefile
++++ Makefile
+@@ -19,12 +19,11 @@
+
+ SHELL = /bin/sh
+ SYSTEM = $(shell uname)
+-C++ = g++
+-CC = gcc
++C++ = $(CXX)
+ DFLAGS = -D__SYS_ZLIB
+ OFLAGS =
+-LFLAGS = -lbz2 -lz
+-CFLAGS = -fPIC
++LFLAGS += -lbz2 -lz
++CFLAGS += -fPIC
+ CFLAGS += $(OFLAGS) $(DFLAGS)
+
+ OBJS = SCommon.o SCompression.o SFileCompactArchive.o \
+@@ -66,8 +65,7 @@
+ all: $(LIB)
+
+ install: $(LIB)
+- install $(LIB) /usr/local/lib
+- mkdir -p /usr/local/include/StormLib
+- cp StormLib.h /usr/local/include/StormLib
+- cp StormPort.h /usr/local/include/StormLib
+- ldconfig
++ install $(LIB) $(PREFIX)/lib
++ mkdir -p $(PREFIX)/include/StormLib
++ cp StormLib.h $(PREFIX)/include/StormLib
++ cp StormPort.h $(PREFIX)/include/StormLib
diff --git a/devel/stormlib-ghost++/files/patch-StormPortLinux.cpp b/devel/stormlib-ghost++/files/patch-StormPortLinux.cpp
new file mode 100644
index 000000000000..1c3b8f2cb816
--- /dev/null
+++ b/devel/stormlib-ghost++/files/patch-StormPortLinux.cpp
@@ -0,0 +1,37 @@
+--- StormPortLinux.cpp
++++ StormPortLinux.cpp
+@@ -24,6 +24,7 @@
+ *
+ ********************************************************************/
+
++#define O_LARGEFILE 0100000
+ #ifndef _WIN32
+ #include "StormPort.h"
+
+@@ -104,8 +105,8 @@
+ return 0xffffffff;
+ }
+
+- struct stat64 fileinfo;
+- fstat64((intptr_t)hFile, &fileinfo);
++ struct stat fileinfo;
++ fstat((intptr_t)hFile, &fileinfo);
+
+ // Fix by Ladik: If "ulOffSetHigh" is not NULL, it needs to be set
+ // to higher 32 bits of a file size.
+@@ -118,12 +119,12 @@
+
+ DWORD SetFilePointer(HANDLE hFile, LONG lOffSetLow, LONG *pOffSetHigh, DWORD ulMethod)
+ {
+- off64_t nFileOffset = (DWORD)lOffSetLow;
++ off_t nFileOffset = (DWORD)lOffSetLow;
+
+ if(pOffSetHigh != NULL)
+- nFileOffset |= (*(off64_t *)pOffSetHigh) << 32;
++ nFileOffset |= (*(off_t *)pOffSetHigh) << 32;
+
+- return lseek64((intptr_t)hFile, nFileOffset, ulMethod);
++ return lseek((intptr_t)hFile, nFileOffset, ulMethod);
+ }
+
+ BOOL SetEndOfFile(HANDLE hFile)
diff --git a/devel/stormlib-ghost++/pkg-descr b/devel/stormlib-ghost++/pkg-descr
new file mode 100644
index 000000000000..5a6d18df9e29
--- /dev/null
+++ b/devel/stormlib-ghost++/pkg-descr
@@ -0,0 +1,4 @@
+The StormLib library is a pack of modules, written in C++,
+which are able to read and also to write files from/to the MPQ archives.
+
+WWW: https://code.google.com/p/ghostplusplus/
diff --git a/devel/stormlib-ghost++/pkg-plist b/devel/stormlib-ghost++/pkg-plist
new file mode 100644
index 000000000000..70955f600fc2
--- /dev/null
+++ b/devel/stormlib-ghost++/pkg-plist
@@ -0,0 +1,4 @@
+include/StormLib/StormLib.h
+include/StormLib/StormPort.h
+lib/libStorm.so
+@dirrmtry include/StormLib