git: f86a608b9d7f - main - games/ri-li: update 2.0.1 → 3.1.4
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 14 May 2024 00:50:50 UTC
The branch main has been updated by amdmi3: URL: https://cgit.FreeBSD.org/ports/commit/?id=f86a608b9d7f39bd591a957a2aae3fcbb767fd1e commit f86a608b9d7f39bd591a957a2aae3fcbb767fd1e Author: Dmitry Marakasov <amdmi3@FreeBSD.org> AuthorDate: 2024-05-06 18:02:37 +0000 Commit: Dmitry Marakasov <amdmi3@FreeBSD.org> CommitDate: 2024-05-14 00:38:04 +0000 games/ri-li: update 2.0.1 → 3.1.4 --- games/ri-li/Makefile | 34 +++++++++++----------------------- games/ri-li/distinfo | 5 +++-- games/ri-li/files/patch-CMakeLists.txt | 25 +++++++++++++++++++++++++ games/ri-li/files/patch-src_sprite.cc | 20 -------------------- games/ri-li/files/patch-src_tableau.cc | 11 ----------- games/ri-li/pkg-plist | 8 ++++++++ 6 files changed, 47 insertions(+), 56 deletions(-) diff --git a/games/ri-li/Makefile b/games/ri-li/Makefile index 6399235eb475..6f11a8caedad 100644 --- a/games/ri-li/Makefile +++ b/games/ri-li/Makefile @@ -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> diff --git a/games/ri-li/distinfo b/games/ri-li/distinfo index 3e333b2b4785..fd10a7a3778f 100644 --- a/games/ri-li/distinfo +++ b/games/ri-li/distinfo @@ -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 diff --git a/games/ri-li/files/patch-CMakeLists.txt b/games/ri-li/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..da6d3b62dd11 --- /dev/null +++ b/games/ri-li/files/patch-CMakeLists.txt @@ -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) diff --git a/games/ri-li/files/patch-src_sprite.cc b/games/ri-li/files/patch-src_sprite.cc deleted file mode 100644 index b0da5acfcc2c..000000000000 --- a/games/ri-li/files/patch-src_sprite.cc +++ /dev/null @@ -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; - } diff --git a/games/ri-li/files/patch-src_tableau.cc b/games/ri-li/files/patch-src_tableau.cc deleted file mode 100644 index a6fca66ee52e..000000000000 --- a/games/ri-li/files/patch-src_tableau.cc +++ /dev/null @@ -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; diff --git a/games/ri-li/pkg-plist b/games/ri-li/pkg-plist new file mode 100644 index 000000000000..c07a301c58dd --- /dev/null +++ b/games/ri-li/pkg-plist @@ -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