mirror of
https://git.FreeBSD.org/ports.git
synced 2025-02-02 11:09:29 +00:00
- Update to 2.3.0
This commit is contained in:
parent
a604a1e407
commit
d3e0510153
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=386235
@ -2,12 +2,10 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= wargus
|
||||
PORTVERSION= 2.2.5.5
|
||||
PORTREVISION= 3
|
||||
PORTVERSION= 2.3.0
|
||||
CATEGORIES= games
|
||||
MASTER_SITES= http://launchpadlibrarian.net/59493162/
|
||||
DISTNAME= ${PORTNAME}_${PORTVERSION}
|
||||
EXTRACT_SUFX= .orig.tar.gz
|
||||
MASTER_SITES= http://launchpadlibrarian.net/200671642/
|
||||
DISTNAME= ${PORTNAME}_${PORTVERSION}.orig
|
||||
|
||||
MAINTAINER= amdmi3@FreeBSD.org
|
||||
COMMENT= Warcraft 2 mod that allows you to play Warcraft 2 with Stratagus
|
||||
@ -15,29 +13,32 @@ COMMENT= Warcraft 2 mod that allows you to play Warcraft 2 with Stratagus
|
||||
LICENSE= GPLv2 # or later
|
||||
LICENSE_FILE= ${WRKSRC}/COPYING
|
||||
|
||||
RUN_DEPENDS= stratagus:${PORTSDIR}/games/stratagus \
|
||||
ffmpeg2theora:${PORTSDIR}/multimedia/ffmpeg2theora \
|
||||
cdparanoia:${PORTSDIR}/audio/cdparanoia
|
||||
BUILD_DEPENDS= stratagus:${PORTSDIR}/games/stratagus
|
||||
LIB_DEPENDS= libpng.so:${PORTSDIR}/graphics/png
|
||||
RUN_DEPENDS= stratagus:${PORTSDIR}/games/stratagus
|
||||
|
||||
NOT_FOR_ARCHS= sparc64
|
||||
USES= pathfix gmake pkgconfig
|
||||
USES= cmake pkgconfig
|
||||
CMAKE_ARGS= -DGAMEDIR:STRING="bin" \
|
||||
-DSHAREDIR:STRING="${DATADIR_REL}"
|
||||
USE_X11= x11
|
||||
USE_GNOME= gtk20
|
||||
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
|
||||
SUB_FILES= ${PORTNAME} pkg-message
|
||||
SUB_FILES= pkg-message
|
||||
|
||||
CPPFLAGS+= -I${LOCALBASE}/include
|
||||
LDFLAGS+= -L${LOCALBASE}/lib
|
||||
PORTDOCS= *
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} \
|
||||
-e '/^CFLAGS/s|-O2|${CPPFLAGS} ${CFLAGS}|' \
|
||||
-e '/^CXXFLAGS/s|$$| ${CXXFLAGS}|' \
|
||||
-e '/^LDFLAGS/s|$$| ${LDFLAGS}|' \
|
||||
-e '/^GTKFLAGS/s/gtk+-2.0/& x11/' \
|
||||
${WRKSRC}/Makefile
|
||||
do-install:
|
||||
${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
|
||||
cd ${WRKSRC} && ${COPYTREE_SHARE} "campaigns contrib maps scripts" ${STAGEDIR}${DATADIR}
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/wartool ${STAGEDIR}${DATADIR}
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/build.sh ${STAGEDIR}${DATADIR}
|
||||
OPTIONS_DEFINE= DOCS
|
||||
|
||||
.include <bsd.port.mk>
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 900000
|
||||
BROKEN= does not build
|
||||
.endif
|
||||
|
||||
post-install:
|
||||
cd ${WRKSRC}/doc && ${INSTALL_MAN} *.6 ${STAGEDIR}${MAN6PREFIX}/man/man6/
|
||||
${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (wargus_2.2.5.5.orig.tar.gz) = 561d0ac5e88abcd5663fca1f7793ee20739aa0d641420bf0a6b7424ebd4ab14f
|
||||
SIZE (wargus_2.2.5.5.orig.tar.gz) = 3605444
|
||||
SHA256 (wargus_2.3.0.orig.tar.gz) = 9b8def814a8c7135653ae95bb1ff836627d39d5f8242a436f486c59701eaeee7
|
||||
SIZE (wargus_2.3.0.orig.tar.gz) = 45006918
|
||||
|
45
games/wargus/files/patch-rip__music_unix.cpp
Normal file
45
games/wargus/files/patch-rip__music_unix.cpp
Normal file
@ -0,0 +1,45 @@
|
||||
--- rip_music_unix.cpp.orig 2015-03-19 18:36:34 UTC
|
||||
+++ rip_music_unix.cpp
|
||||
@@ -39,7 +39,12 @@
|
||||
#include <unistd.h>
|
||||
#include <libgen.h>
|
||||
|
||||
-#include <mntent.h>
|
||||
+#if defined(__linux__)
|
||||
+# include <mntent.h>
|
||||
+#elif defined(__FreeBSD__)
|
||||
+# include <sys/param.h>
|
||||
+# include <sys/mount.h>
|
||||
+#endif
|
||||
|
||||
#include "rip_music.h"
|
||||
|
||||
@@ -140,6 +145,7 @@ static char * find_mnt_dir(const char *
|
||||
|
||||
static char * find_dev(const char * mnt_dir) {
|
||||
|
||||
+#if defined(__linux__)
|
||||
struct mntent * mnt;
|
||||
char * dev = NULL;
|
||||
FILE * file;
|
||||
@@ -167,6 +173,20 @@ static char * find_dev(const char * mnt_
|
||||
endmntent(file);
|
||||
|
||||
return dev;
|
||||
+#elif defined(__FreeBSD__)
|
||||
+ struct statfs sfs;
|
||||
+
|
||||
+ if ( statfs(mnt_dir, &sfs) != 0 ) {
|
||||
+
|
||||
+ fprintf(stderr, "Error: Cannot get mounted device: %s\n", strerror(errno));
|
||||
+ return NULL;
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ return strdup(sfs.f_mntfromname);
|
||||
+#else
|
||||
+ return NULL;
|
||||
+#endif
|
||||
|
||||
}
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- wargus.c.orig 2010-11-22 03:07:16.000000000 +0300
|
||||
+++ wargus.c 2014-05-16 20:50:55.007540700 +0400
|
||||
@@ -86,7 +86,7 @@
|
||||
int ConsoleMode = 0;
|
||||
#endif
|
||||
|
||||
-inline void error(char * title, char * text) {
|
||||
+void error(char * title, char * text) {
|
||||
|
||||
#ifdef WIN32
|
||||
MessageBox(NULL, text, title, MB_OK | MB_ICONERROR);
|
@ -1,36 +0,0 @@
|
||||
--- wartool.orig.c
|
||||
+++ wartool.c
|
||||
@@ -61,6 +61,7 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <ctype.h>
|
||||
+#include <zlib.h>
|
||||
#include <png.h>
|
||||
|
||||
#include "endian.h"
|
||||
@@ -1876,7 +1877,7 @@
|
||||
return 1;
|
||||
}
|
||||
|
||||
- if (setjmp(png_ptr->jmpbuf)) {
|
||||
+ if (setjmp(png_jmpbuf(png_ptr))) {
|
||||
// FIXME: must free buffers!!
|
||||
png_destroy_write_struct(&png_ptr, &info_ptr);
|
||||
fclose(fp);
|
||||
@@ -1888,14 +1889,8 @@
|
||||
png_set_compression_level(png_ptr, Z_BEST_COMPRESSION);
|
||||
|
||||
// prepare the file information
|
||||
- info_ptr->width = w;
|
||||
- info_ptr->height = h;
|
||||
- info_ptr->bit_depth = 8;
|
||||
- info_ptr->color_type = PNG_COLOR_TYPE_PALETTE;
|
||||
- info_ptr->interlace_type = 0;
|
||||
- info_ptr->valid |= PNG_INFO_PLTE;
|
||||
- info_ptr->palette = (png_colorp)pal;
|
||||
- info_ptr->num_palette = 256;
|
||||
+ png_set_IHDR(png_ptr, info_ptr, w, h, 8, PNG_COLOR_TYPE_PALETTE, 0, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
|
||||
+ png_set_PLTE(png_ptr, info_ptr, (png_colorp)pal, 256);
|
||||
|
||||
if (transparent) {
|
||||
unsigned char* p;
|
10
games/wargus/files/patch-xmi2mid.cpp
Normal file
10
games/wargus/files/patch-xmi2mid.cpp
Normal file
@ -0,0 +1,10 @@
|
||||
--- xmi2mid.cpp.orig 2015-03-19 18:36:34 UTC
|
||||
+++ xmi2mid.cpp
|
||||
@@ -27,6 +27,7 @@ SOFTWARE.
|
||||
#include <iterator>
|
||||
#include <new>
|
||||
#include <vector>
|
||||
+#include <cstdlib>
|
||||
|
||||
#include <stdint.h>
|
||||
|
@ -1,6 +1,6 @@
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
The Wargus tool has been installed to "%%DATADIR%%".
|
||||
The Wargus tool has been installed to "%%PREFIX%%/bin/wartool".
|
||||
|
||||
You can now use this tool to extract Warcraft 2 data for use with the
|
||||
Stratagus engine from the following CDs:
|
||||
@ -13,10 +13,14 @@ Stratagus engine from the following CDs:
|
||||
* German Expansion
|
||||
* Spanish Original
|
||||
|
||||
If you have one of the above CDs mounted on /cdrom, 'su' to root, change to
|
||||
the "%%DATADIR%%" directory and try executing:
|
||||
If you have one of the above CDs mounted on /mnt, 'su' to root, and try
|
||||
executing:
|
||||
|
||||
$ ./build.sh -p /cdrom
|
||||
# wartool /mnt %%DATADIR%%
|
||||
|
||||
or
|
||||
|
||||
# wartool /mnt/data %%DATADIR%%
|
||||
|
||||
After your Warcraft 2 data has been successfully extracted, run 'wargus' as
|
||||
the user you intend to play the game with.
|
||||
|
@ -1,22 +0,0 @@
|
||||
#!/bin/sh
|
||||
# wargus - wargus/stratagus wrapper script
|
||||
#
|
||||
# Note: If you have noticed any problems with this script or my port, please
|
||||
# let me know as soon as possible!
|
||||
#
|
||||
# 2004 Travis Poppe <tlp@LiquidX.org>
|
||||
|
||||
DATADIR="%%DATADIR%%/data.wc2"
|
||||
|
||||
if [ -d $DATADIR ]; then
|
||||
echo "Running Stratagus with Warcraft 2 data found in \"$DATADIR\"."
|
||||
echo ""
|
||||
exec stratagus -d $DATADIR "$@"
|
||||
else
|
||||
echo "ERROR: Warcraft 2 data not found in \"$DATADIR\"."
|
||||
echo ""
|
||||
echo "Please follow the instructions from the installation message:"
|
||||
echo ""
|
||||
pkg_info -D "wargus-[0-9]*"
|
||||
exit 1
|
||||
fi
|
@ -10,4 +10,4 @@ Since Wargus uses a different engine, not all things will work the same
|
||||
as they did in the original game. If you want an absolutely unchanged
|
||||
Warcraft 2 experience, you will still have to play the original.
|
||||
|
||||
WWW: http://wargus.sourceforge.net
|
||||
WWW: http://wargus.sourceforge.net/
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user