- Update to 130

- Take maintainership
- Use Makefile.bsdg instead of Makefile.bsd
- Add/Remove patch-Makefile.bsdg/bsd files
- Add patch-sound.c, the sound.c file is using deprecated functions of alut
- Remove pkg-plist, now ,it isn't necessary

Approved by:	garga (mentor)
This commit is contained in:
Jose Alonso Cardenas Marquez 2006-08-20 14:43:55 +00:00
parent 17d96d9076
commit 0467484228
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=171045
6 changed files with 118 additions and 2743 deletions

View file

@ -6,32 +6,29 @@
#
PORTNAME= el
PORTVERSION= 112
PORTREVISION= 1
PORTVERSION= 130
CATEGORIES= games
MASTER_SITES= ftp://ftp.berlios.de/pub/elc/ http://el.tfm.ro/
DISTFILES= ${EL_PROG} ${EL_DATA}
EXTRACT_ONLY= ${EL_PROG}
MASTER_SITES= ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= acm/${PORTNAME}
DIST_SUBDIR= ${PORTNAME}
MAINTAINER= ports@FreeBSD.org
MAINTAINER= acm@FreeBSD.org
COMMENT= Eternal Lands is a free 3D MMORPG
LIB_DEPENDS= openal.0:${PORTSDIR}/audio/openal \
LIB_DEPENDS= png.5:${PORTSDIR}/graphics/png \
openal.0:${PORTSDIR}/audio/openal \
vorbis.3:${PORTSDIR}/audio/libvorbis \
cal3d.11:${PORTSDIR}/graphics/cal3d \
cal3d.12:${PORTSDIR}/graphics/cal3d \
alut.1:${PORTSDIR}/audio/freealut
RUN_DEPENDS= unzip:${PORTSDIR}/archivers/unzip
RUN_DEPENDS= ${LOCALBASE}/share/${PORTNAME}/el.ini:${PORTSDIR}/games/el-data
USE_BZIP2= yes
USE_GMAKE= yes
USE_GNOME= libxml2
USE_SDL= sdl net
EL_PROG= elc_${PORTVERSION}.tgz
EL_DATA= el_${PORTVERSION}_linux.zip
WRKSRC= ${WRKDIR}/elc
ALL_TARGET= cal3d
MAKEFILE= Makefile.bsd
ALL_TARGET= el.x86
MAKEFILE= Makefile.bsdg
.include <bsd.port.pre.mk>
@ -40,20 +37,30 @@ CFLAGS+= -DX86_64
.endif
.if ${OSVERSION} < 500000
BROKEN= "does not compile"
BROKEN= does not compile
.endif
.if ${ARCH} == "sparc64"
BROKEN= "Does not compile on sparc64"
BROKEN= Does not compile on sparc64
.endif
do-install:
${ECHO} "#!/bin/sh" > ${WRKDIR}/el
${ECHO} "cd ${DATADIR}; ./el.x86.bsd.bin" >> ${WRKDIR}/el
${INSTALL_SCRIPT} ${WRKDIR}/el ${PREFIX}/bin
post-extract:
@cd ${WRKSRC} && \
${FIND} * -type f -exec ${REINPLACE_CMD} -i "" -e 's|malloc.h|stdlib.h|g' "{}" \;
${MKDIR} ${DATADIR}
${INSTALL_PROGRAM} ${WRKSRC}/el.x86.bsd.bin ${DATADIR}
${UNZIP_CMD} ${DISTDIR}/${EL_DATA} -d ${DATADIR}
post-patch:
@${ECHO} "bin/el" > ${PLIST}
@${ECHO} "%%DATADIR%%/el.x86" >> ${PLIST}
@${ECHO} "@dirrmtry %%DATADIR%%" >> ${PLIST}
pre-install:
${ECHO} "#!/bin/sh" > ${WRKDIR}/el
${ECHO} "cd ${DATADIR} || exit 1 " >> ${WRKDIR}/el
${ECHO} "exec ${DATADIR}/el.x86" >> ${WRKDIR}/el
do-install:
@${MKDIR} ${DATADIR}
${INSTALL_SCRIPT} ${WRKDIR}/el ${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/el.x86 ${DATADIR}
.include <bsd.port.post.mk>

View file

@ -1,6 +1,3 @@
MD5 (elc_112.tgz) = a4be2dd8a7ff378e0836ce4d26cedfd0
SHA256 (elc_112.tgz) = b4658776bf105da40c195f81daf9889a014c9c895d2a7145bfd15ac62261c439
SIZE (elc_112.tgz) = 596932
MD5 (el_112_linux.zip) = 3591dd7dfd4f7a2f35d77f2cd0044610
SHA256 (el_112_linux.zip) = 22bc72f2d8a50911f72ce364a203794497ea9d6de87488a165cb098ff08d1bc7
SIZE (el_112_linux.zip) = 28691858
MD5 (el/el-130.tar.bz2) = d95c84f94f7491ca629dc2ca8d47757d
SHA256 (el/el-130.tar.bz2) = 5bd81487e68705210043731764d17b7e6739d3bf2724fe7150ecca09c0d51805
SIZE (el/el-130.tar.bz2) = 760261

View file

@ -1,78 +0,0 @@
--- Makefile.bsd.orig Mon Oct 3 02:43:06 2005
+++ Makefile.bsd Thu Dec 22 13:46:02 2005
@@ -1,40 +1,41 @@
PROG= el.x86.bsd.bin
-SRCS= 2d_objects.c 3d_objects.c \
- actor_scripts.c actors.c asc.c buddy.c books.c \
- cache.c chat.c colors.c console.c consolewin.c cursors.c \
- dialogues.c draw_scene.c \
- elconfig.c elmemory.c elwindows.c encyclopedia.c errors.c events.c \
- framebuffer.o filter.c font.c frustum.c \
- gamewin.c gl_init.c hud.c help.c \
- ignore.c init.c interface.c items.c \
- keys.c knowledge.c lights.c loading_win.c loginwin.c \
- main.c manufacture.c map_io.c mapwin.c \
- md2loader.c md5.c misc.c multiplayer.c \
- new_actors.c new_character.c notepad.c \
- openingwin.c \
- particles.c paste.c pathfinder.c pm_log.c \
- questlog.c reflection.c rules.c \
- sector.c shadows.c sound.c spells.c stats.c tabs.c \
- text.c textures.c tile_map.c timers.c translate.c trade.c \
- weather.c widgets.c
+SRCS= 2d_objects.c 3d_objects.c actor_scripts.c actors.c \
+ alphamap.c asc.c bags.c books.c buddy.c cache.c cal.c \
+ chat.c colors.c console.c consolewin.c cursors.c \
+ dialogues.c draw_scene.c elconfig.c elmemory.c elwindows.c \
+ encyclopedia.c errors.c events.c filter.c font.c framebuffer.c \
+ frustum.c gamewin.c gl_init.c help.c highlight.c hud.c \
+ ignore.c init.c interface.c items.c keys.c knowledge.c \
+ lights.c loading_win.c loginwin.c main.c manufacture.c \
+ map_io.c mapwin.c md2loader.c md5.c misc.c multiplayer.c \
+ new_actors.c new_character.c normals.c notepad.c \
+ openingwin.c particles.c paste.c pathfinder.c pm_log.c \
+ questlog.c queue.c reflection.c rules.c sector.c shader.c \
+ shadows.c simd.c skills.c sort.c sound.c spells.c stats.c \
+ storage.c symbol_table.c tabs.c terrain.c text.c textures.c \
+ tile_map.c timers.c trade.c translate.c weather.c widgets.c
-NOMAN= true
+NO_MAN= true
LOCALBASE?=/usr/local
X11BASE?=/usr/X11R6
SDL_CONFIG?=${LOCALBASE}/bin/sdl11-config
LIBXML2_CONFIG?=${LOCALBASE}/bin/xml2-config
.if NODEBUG
CFLAGS=-O3 -fomit-frame-pointer -ffast-math -pipe
+CXXFLAGS=${CFLAGS} -fno-exceptions
.else
-CFLAGS=-Wdeclaration-after-statement -Wall -Werror -ggdb -pipe
+CFLAGS+=-Wdeclaration-after-statement -ggdb -pipe
+CXXFLAGS=-ggdb -pipe -fno-exceptions
.endif
-CFLAGS+=-march=i686 -DBSD -DELC
-CFLAGS+=-I${X11BASE}/include `${SDL_CONFIG} --cflags`
-CFLAGS+=`${LIBXML2_CONFIG} --cflags` -I${LOCALBASE}/include
+CPPFLAGS+=-DBSD -DELC
+CPPFLAGS+=-I${X11BASE}/include `${SDL_CONFIG} --cflags`
+CPPFLAGS+=`${LIBXML2_CONFIG} --cflags` -I${LOCALBASE}/include
+CFLAGS+=${CPPFLAGS}
+CXXFLAGS+=${CPPFLAGS}
LDFLAGS+=-L${X11BASE}/lib -lGL `${SDL_CONFIG} --libs` `${LIBXML2_CONFIG} --libs`
-LDFLAGS+=-L${LOCALBASE}/lib -lSDL_net -lopenal -lGLU -lvorbis -lvorbisfile -lm
+LDFLAGS+=-L${LOCALBASE}/lib -lSDL_net -lopenal -lalut -lGLU -lvorbis -lvorbisfile -lm
.if CAL3D
-SRCS+=cal3dwrap.c
+SRCS+=cal3d_wrapper.cpp
LDFLAGS+=-lcal3d
.endif
@@ -43,8 +44,5 @@
cal3d:
make -DCAL3D -f Makefile.bsd
-
-cal3dwrap.o:
- $(CXX) ${CFLAGS} -c cal3dwrap.c
.include <bsd.prog.mk>

View file

@ -0,0 +1,53 @@
--- Makefile.bsdg Fri Aug 18 08:37:43 2006
+++ Makefile.bsdg Fri Aug 18 08:47:09 2006
@@ -1,7 +1,7 @@
.PHONY: clean release docs
# tune these for your setup & compile options
-OPTIONS=-DLINUX -DELC -DPNG_SCREENSHOT -DUSE_FRAMEBUFFER -DNEW_FRUSTUM -DBUG_FIX_3D_OBJECTS_MIN_MAX -DNEW_TEX -DOPTIONS_I18N -DATI_9200_FIX -DNEW_ACTOR_ANIMATION -DAUTO_UPDATE -DCOUNTERS
+OPTIONS=-DFREEBSD -DELC -DPNG_SCREENSHOT -DUSE_FRAMEBUFFER -DNEW_FRUSTUM -DBUG_FIX_3D_OBJECTS_MIN_MAX -DNEW_TEX -DOPTIONS_I18N -DATI_9200_FIX -DNEW_ACTOR_ANIMATION -DAUTO_UPDATE -DCOUNTERS
#-DX86_64
#-DTIMER_CHECK
@@ -25,7 +25,6 @@
#-DAFK_FIX # fixes afk messages to count only PM's, and store and count local messages if the option is selected
#-DFONTS_FIX # dynamically loads all fonts with the filename in the format font*.bmp, and makes them accessable in the options
-PLATFORM=-march=i686
XDIR=-L/usr/X11R6/lib
CWARN=
#-Wdeclaration-after-statement -Wall -Werror
@@ -33,12 +32,12 @@
#-Wall -Werror
# basic compiling and linking - rarely changed
-CFLAGS=$(PLATFORM) $(CWARN) -g -ggdb -pipe $(OPTIONS) $(shell sdl11-config --cflags) $(shell xml2-config --cflags) -I/usr/X11R6/include/
-_CFLAGS=$(PLATFORM) -O3 -fomit-frame-pointer -ffast-math -pipe $(OPTIONS) $(shell sdl11-config --cflags) $(shell xml2-config --cflags)
-CXXFLAGS=$(PLATFORM) $(CPPWARN) -O -ggdb -pipe -I/usr/local/include $(OPTIONS)
-_CXXFLAGS=$(PLATFORM) -O3 -fomit-frame-pointer -ffast-math -pipe $(OPTIONS)
+CFLAGS+=$(OPTIONS) $(shell sdl11-config --cflags) $(shell xml2-config --cflags) -I/usr/X11R6/include/
+_CFLAGS=$(CFLAGS) -fomit-frame-pointer -ffast-math -pipe $(OPTIONS) $(shell sdl11-config --cflags) $(shell xml2-config --cflags)
+CXXFLAGS+=-I/usr/local/include $(OPTIONS)
+_CXXFLAGS=$(CXXFLAGS) -fomit-frame-pointer -ffast-math $(OPTIONS)
-LDFLAGS=$(shell sdl11-config --libs) $(shell xml2-config --libs) -lSDL_net -lopenal $(XDIR) -lGL -lGLU -lvorbis -lvorbisfile -lcal3d -lm -lpng
+LDFLAGS+=$(shell sdl11-config --libs) $(shell xml2-config --libs) -lSDL_net -lopenal $(XDIR) -lalut -lGL -lGLU -lvorbis -lvorbisfile -lcal3d -lm -lpng
_LDFLAGS=$(XDIR) -lGL -lpthread -lz
STATICLIBS=libs/libSDL_net.a libs/libSDL.a libs/libopenal.a libs/libvorbisfile.a libs/libvorbis.a libs/libogg.a libs/libxml2.a libs/libcal3d.a
@@ -68,11 +67,11 @@
OBJS=$(COBJS) $(CXXOBJS)
-EXE=el.x86.bsd.bin
+EXE=el.x86
-CC=gcc
-CXX=g++
-LINK=gcc
+CC?=gcc
+CXX?=g++
+LINK?=gcc
# the compile targets
$(EXE): $(OBJS)

View file

@ -0,0 +1,30 @@
--- sound.c Fri Aug 18 12:54:36 2006
+++ sound.c Fri Aug 18 11:33:35 2006
@@ -313,10 +313,11 @@
ALuint get_loaded_buffer(int i)
{
int error;
- ALsizei size,freq;
+ ALsizei size;
ALenum format;
- ALvoid *data;
ALboolean loop;
+ ALfloat freq;
+ ALvoid* data = 0;
FILE *fin;
if(!alIsBuffer(sound_buffer[i]))
@@ -349,10 +350,10 @@
// OS X alutLoadWAVFile doesn't have a loop option... Oh well :-)
alutLoadWAVFile (sound_files[i], &format, &data, &size, &freq);
#else
- alutLoadWAVFile (sound_files[i], &format, &data, &size, &freq, &loop);
+ data = alutLoadMemoryFromFile (sound_files[i], &format, &size, &freq);
#endif
- alBufferData(sound_buffer[i],format,data,size,freq);
- alutUnloadWAV(format,data,size,freq);
+ alBufferData(sound_buffer[i],format,data,size,(int)freq);
+// alutUnloadWAV(format,data,size,freq);
}
return sound_buffer[i];
}

File diff suppressed because it is too large Load diff