mirror of
https://git.FreeBSD.org/ports.git
synced 2025-02-03 11:12:13 +00:00
games/ri-li: update 2.0.1 → 3.1.4
This commit is contained in:
parent
58a34eb5ee
commit
f86a608b9d
@ -1,38 +1,26 @@
|
||||
PORTNAME= Ri-li
|
||||
PORTVERSION= 2.0.1
|
||||
PORTREVISION= 7
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 3.1.4
|
||||
CATEGORIES= games
|
||||
MASTER_SITES= SF/${PORTNAME:tl}/${PORTNAME}%20Linux_Unix/${PORTNAME}%20V${PORTVERSION}
|
||||
|
||||
MAINTAINER= amdmi3@FreeBSD.org
|
||||
COMMENT= Drive a toy wood train in many levels - snake-like arcade game
|
||||
WWW= https://ri-li.sourceforge.net/
|
||||
WWW= https://github.com/petitlapin/Li-Ri
|
||||
|
||||
LICENSE= GPLv2 GPLv3
|
||||
LICENSE_COMB= dual
|
||||
LICENSE_FILE_GPLv3= ${WRKSRC}/COPYING
|
||||
|
||||
USES= gmake sdl tar:bzip2
|
||||
GNU_CONFIGURE= yes
|
||||
USE_SDL= sdl mixer
|
||||
BUILD_DEPENDS= ${LOCALBASE}/include/SimpleIni.h:devel/simpleini
|
||||
|
||||
CPPFLAGS+= `${SDL_CONFIG} --cflags` -I${LOCALBASE}/include
|
||||
USES= cmake pkgconfig sdl
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= petitlapin
|
||||
GH_PROJECT= Li-Ri
|
||||
USE_SDL= sdl2 mixer2
|
||||
CMAKE_ON= USE_CONAN # doesn't really use conan, just handles system depends properly
|
||||
|
||||
PLIST_FILES= bin/Ri_li
|
||||
DATADIR= ${PREFIX}/share/Li-ri
|
||||
PORTDATA= *
|
||||
|
||||
DESKTOP_ENTRIES="Ri-li" \
|
||||
"Drive a toy wood train in many levels - snake-like arcade game" \
|
||||
"${DATADIR}/Ri-li-icon-48x48.png" \
|
||||
"Ri_li" \
|
||||
"Game;ArcadeGame;" \
|
||||
false
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's|-lSDL |`${SDL_CONFIG} --libs`|' ${WRKSRC}/configure
|
||||
@${REINPLACE_CMD} -e 's| gentoo||' ${WRKSRC}/Makefile.in
|
||||
@${REINPLACE_CMD} -e '/strcpy.*DefPath/ s|.*|strcpy(DefPath,"${DATADIR}/");|' ${WRKSRC}/src/main.cc
|
||||
@${REINPLACE_CMD} -e '/include/ s|iostream.h|iostream|' ${WRKSRC}/src/*.cc
|
||||
@${REINPLACE_CMD} -e 's|cerr|std::&|g; s|endl|std::&|g' ${WRKSRC}/src/*.cc
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,3 @@
|
||||
SHA256 (Ri-li-2.0.1.tar.bz2) = f71ccc20c37c601358d963e087ac0d524de8c68e96df09c3aac1ae65edd38dbd
|
||||
SIZE (Ri-li-2.0.1.tar.bz2) = 13745398
|
||||
TIMESTAMP = 1715015770
|
||||
SHA256 (petitlapin-Li-Ri-v3.1.4_GH0.tar.gz) = 56687ef201c915bef44fa9ce0f4e195d6e6d0cda5d960ba33b67caf2148324f6
|
||||
SIZE (petitlapin-Li-Ri-v3.1.4_GH0.tar.gz) = 47178812
|
||||
|
25
games/ri-li/files/patch-CMakeLists.txt
Normal file
25
games/ri-li/files/patch-CMakeLists.txt
Normal file
@ -0,0 +1,25 @@
|
||||
--- CMakeLists.txt.orig 2024-01-15 20:22:00 UTC
|
||||
+++ CMakeLists.txt
|
||||
@@ -25,6 +25,7 @@ if(USE_CONAN)
|
||||
if(USE_CONAN)
|
||||
find_package(SDL2 REQUIRED CONFIG)
|
||||
find_package(SDL2_mixer REQUIRED CONFIG)
|
||||
+ find_path(SIMPLEINI_INCLUDE_DIR SimpleIni.h)
|
||||
else()
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(SDL2 REQUIRED sdl2 SDL2_mixer)
|
||||
@@ -69,12 +70,13 @@ if(USE_CONAN)
|
||||
|
||||
if(USE_CONAN)
|
||||
target_link_libraries(${LIRI_EXECUTABLE_NAME} PRIVATE SDL2::SDL2 SDL2_mixer::SDL2_mixer)
|
||||
+ target_include_directories(${LIRI_EXECUTABLE_NAME} PRIVATE ${SIMPLEINI_INCLUDE_DIR})
|
||||
+ target_compile_definitions(${LIRI_EXECUTABLE_NAME} PRIVATE SI_NO_CONVERSION)
|
||||
else()
|
||||
target_include_directories(${LIRI_EXECUTABLE_NAME} PUBLIC ${SDL2_INCLUDE_DIRS})
|
||||
target_link_libraries(${LIRI_EXECUTABLE_NAME} PRIVATE ${SDL2_LINK_LIBRARIES})
|
||||
endif()
|
||||
|
||||
-target_link_libraries(${LIRI_EXECUTABLE_NAME} PRIVATE SimpleIni::SimpleIni)
|
||||
|
||||
|
||||
include(GNUInstallDirs)
|
@ -1,20 +0,0 @@
|
||||
--- src/sprite.cc.orig 2007-11-02 11:48:20 UTC
|
||||
+++ src/sprite.cc
|
||||
@@ -351,7 +351,7 @@ bool Sprite::Load(unsigned char *Buf,lon
|
||||
// Fabrique la surface
|
||||
Image[i]=SDL_CreateRGBSurface((Dim[i].bpp-3)*SDL_SRCALPHA,Dim[i].L,Dim[i].H,Dim[i].bpp*8,
|
||||
0xff,0xff00,0xff0000,0xff000000*(Dim[i].bpp-3));
|
||||
- if(Image[i]<=NULL) {
|
||||
+ if(Image[i]==NULL) {
|
||||
cerr <<"Impossible de créer une Surface SDL!"<<endl;
|
||||
return false;
|
||||
}
|
||||
@@ -485,7 +485,7 @@ bool Sprite::Nouveau(int Lx,int Ly)
|
||||
// Fabrique la surface
|
||||
Image[0]=SDL_CreateRGBSurface((Dim[0].bpp-3)*SDL_SRCALPHA,Dim[0].L,Dim[0].H,Dim[0].bpp*8,
|
||||
0xff,0xff00,0xff0000,0xff000000*(Dim[0].bpp-3));
|
||||
- if(Image[0]<=NULL) {
|
||||
+ if(Image[0]==NULL) {
|
||||
cerr <<"Impossible de créer une Surface SDL!"<<endl;
|
||||
return false;
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
--- src/tableau.cc.orig 2007-11-02 11:48:21 UTC
|
||||
+++ src/tableau.cc
|
||||
@@ -87,7 +87,7 @@ bool Tableau::Save(void)
|
||||
|
||||
// Alloue la mémoire
|
||||
Buf=new unsigned char [sizeof(s_Tableau)*N+sizeof(int)+1];
|
||||
- if(Buf<=0) return false;
|
||||
+ if(Buf==NULL) return false;
|
||||
|
||||
// Charge les tableaux
|
||||
Buf[0]=N/256;
|
8
games/ri-li/pkg-plist
Normal file
8
games/ri-li/pkg-plist
Normal file
@ -0,0 +1,8 @@
|
||||
bin/Li-ri
|
||||
share/appdata/io.github.petitlapin.Li-ri.appdata.xml
|
||||
share/applications/io.github.petitlapin.Li-ri.desktop
|
||||
share/icons/hicolor/128x128/apps/io.github.petitlapin.Li-ri.png
|
||||
share/icons/hicolor/16x16/apps/io.github.petitlapin.Li-ri.png
|
||||
share/icons/hicolor/32x32/apps/io.github.petitlapin.Li-ri.png
|
||||
share/icons/hicolor/48x48/apps/io.github.petitlapin.Li-ri.png
|
||||
share/icons/hicolor/64x64/apps/io.github.petitlapin.Li-ri.png
|
Loading…
x
Reference in New Issue
Block a user