games/devilutionX 1.0.0: version update and fixed some issues

PR:		242940
Submitted by:	malavon <benny.goemans@gmail.com> (maintainer, with slight changes)
This commit is contained in:
Steve Wills 2020-01-02 16:53:35 +00:00
parent cbc00fbbbc
commit 2ea014043e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=521859
4 changed files with 60 additions and 41 deletions

View File

@ -1,41 +1,42 @@
# $FreeBSD$
PORTNAME= devilutionX
PORTVERSION= 0.5.0
PORTREVISION= 0
PORTVERSION= 1.0.0
CATEGORIES= games
MAINTAINER= benny.goemans@gmail.com
COMMENT= Open-source implementation of Diablo Game engine
COMMENT= Diablo I engine for modern operating systems
LICENSE= UNLICENSE
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= ${LOCALBASE}/share/fonts/CharisSIL/CharisSIL-B.ttf:x11-fonts/charis
RUN_DEPENDS:= ${BUILD_DEPENDS}
LIB_DEPENDS= libsodium.so:security/libsodium
USES= cmake compiler:c++11-lang dos2unix sdl
USE_SDL= mixer2 sdl2 ttf2
PLIST_FILES= bin/devilutionx
USE_GITHUB= yes
GH_ACCOUNT= diasurgical
DOS2UNIX_GLOB= *.c *.h CMakeLists.txt
INSTALLS_ICONS= yes
OPTIONS_DEFAULT= RELEASE
CXXFLAGS+= -DTTF_FONT_PATH=\\\"${LOCALBASE}/share/fonts/CharisSIL/CharisSIL-B.ttf\\\"
CMAKE_ARGS+= -D CMAKE_INSTALL_BINDIR:PATH=${BINDIR} \
-D CMAKE_INSTALL_SHAREDIR:PATH=${PREFIX}/share \
-D GIT_TAG=${PORTVERSION}
OPTIONS_SINGLE= TYPE
OPTIONS_SINGLE_TYPE= NIGHTLY RELEASE
.if defined(WITH_DEBUG)
CMAKE_ARGS+= -D NIGHTLY_BUILD:BOOL=ON
.else
CMAKE_ARGS+= -D BINARY_RELEASE:BOOL=ON
.endif
RELEASE_DESC= Build a release build
NIGHTLY_DESC= Build a debug build
RELEASE_CMAKE_BOOL= BINARY_RELEASE
NIGHTLY_CMAKE_BOOL= NIGHTLY_BUILD
DESKTOP_ENTRIES= "DevilutionX" \
"" \
"" \
"devilutionx" \
"Game;AdventureGame;" \
false
PLIST_FILES= bin/devilutionx \
share/applications/devilutionx.desktop \
share/icons/hicolor/16x16/apps/devilutionx.png \
share/icons/hicolor/32x32/apps/devilutionx.png \
share/icons/hicolor/48x48/apps/devilutionx.png
.include <bsd.port.mk>

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1570734030
SHA256 (diasurgical-devilutionX-0.5.0_GH0.tar.gz) = 45f779084aa7459880e5eab1bf3d63dcd223d937485a840dc055e7d1e8eace5c
SIZE (diasurgical-devilutionX-0.5.0_GH0.tar.gz) = 1767600
TIMESTAMP = 1577908977
SHA256 (diasurgical-devilutionX-1.0.0_GH0.tar.gz) = fafb0bac935bbbee8e261d7fbd2d4ea769b88bbc78ba1affef74064a2cc77779
SIZE (diasurgical-devilutionX-1.0.0_GH0.tar.gz) = 1798349

View File

@ -1,16 +1,15 @@
--- CMakeLists.txt.orig 2019-10-11 23:27:07 UTC
--- CMakeLists.txt.orig 2019-12-27 15:25:22 UTC
+++ CMakeLists.txt
@@ -68,6 +68,9 @@ list(APPEND CMAKE_MODULE_PATH "${DevilutionX_SOURCE_DI
if(${CMAKE_SYSTEM_NAME} STREQUAL FreeBSD)
set(ASAN OFF)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DO_LARGEFILE=0 -Dstat64=stat -Dlstat64=lstat -Dlseek64=lseek -Doff64_t=off_t -Dfstat64=fstat -Dftruncate64=ftruncate")
+ add_definitions(-D__BSD_VISIBLE=1)
+ add_definitions(-D__POSIX_VISIBLE=200809L)
+ add_definitions(-D__XSI_VISIBLE=1)
@@ -326,7 +326,7 @@ if(WIN32)
endif()
endif()
if(WIN32)
@@ -337,8 +340,8 @@ endif()
-if(NOT WIN32 AND NOT APPLE)
+if(NOT WIN32 AND NOT APPLE AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL FreeBSD)
# Enable POSIX extensions such as `readlink` and `ftruncate`.
add_definitions(-D_POSIX_C_SOURCE=200809L)
endif()
@@ -337,8 +337,8 @@ endif()
if(NOT CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
# Change __FILE__ to only show the path relative to the project folder
@ -21,12 +20,13 @@
if(DEBUG)
# Note: For Valgrind suppor.
@@ -368,6 +371,8 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# Silence appfat.cpp warnings
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-narrowing")
@@ -399,3 +399,9 @@ if(APPLE)
include(CPack)
endif()
+
+install(TARGETS devilutionx DESTINATION ${BINDIR})
if(APPLE)
set_source_files_properties("./Packaging/macOS/AppIcon.icns" PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
+install(TARGETS devilutionx DESTINATION ${CMAKE_INSTALL_BINDIR})
+install(FILES Packaging/fedora/devilutionx.desktop DESTINATION ${CMAKE_INSTALL_SHAREDIR}/applications)
+install(FILES Packaging/resources/16.png DESTINATION ${CMAKE_INSTALL_SHAREDIR}/icons/hicolor/16x16/apps RENAME devilutionx.png)
+install(FILES Packaging/resources/Diablo_32.png DESTINATION ${CMAKE_INSTALL_SHAREDIR}/icons/hicolor/32x32/apps RENAME devilutionx.png)
+install(FILES Packaging/resources/Diablo_48.png DESTINATION ${CMAKE_INSTALL_SHAREDIR}/icons/hicolor/48x48/apps RENAME devilutionx.png)

View File

@ -0,0 +1,18 @@
--- Packaging/fedora/devilutionx.desktop.orig 2019-12-27 16:29:35 UTC
+++ Packaging/fedora/devilutionx.desktop
@@ -1,11 +1,11 @@
[Desktop Entry]
-Name=devilutionX
+Name=DevilutionX
GenericName=DevilutionX
-Comment=Play Diablo I on Linux
+Comment=Play Diablo I
Exec=devilutionx
-Icon=devilutionx.png
+Icon=devilutionx
Terminal=false
Type=Application
X-DCOP-ServiceType=Multi
X-KDE-StartupNotify=true
-Categories=Qt;Game;RolePlaying;
+Categories=Game;RolePlaying;