Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Nov 2024 18:31:43 GMT
From:      Zsolt Udvari <uzsolt@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 9c26b7dfb8ba - main - emulators/es-de: Simplify port
Message-ID:  <202411121831.4ACIVhuD056207@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by uzsolt:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9c26b7dfb8ba801430daf3c364b86e6284857b70

commit 9c26b7dfb8ba801430daf3c364b86e6284857b70
Author:     Stefan Schlosser <bsdcode@disroot.org>
AuthorDate: 2024-11-12 18:29:13 +0000
Commit:     Zsolt Udvari <uzsolt@FreeBSD.org>
CommitDate: 2024-11-12 18:31:16 +0000

    emulators/es-de: Simplify port
    
    Remove unnecessary localbase from USES.
    Promote unbundled utf8cpp include path to CMakeLists.txt instead of replacing
    C include directive in ${WRKSRC}/es-core/utils/StringUtil.h.
    Use CMake's modules for finding unbundled RapidJSON and rlottie package.
    This allows to remove the INCLUDE_DIRS for both libraries (CMake already does
    the right thing when using find_package).
    Replace rlottie_LINK_LIBRARIES with the more proper rlottie_LIBRARIES.
    
    PR:             282698
    Approved by:    submitter is maintainer
---
 emulators/es-de/Makefile                   | 15 ++++++---------
 emulators/es-de/files/patch-CMakeLists.txt | 26 ++++++++------------------
 2 files changed, 14 insertions(+), 27 deletions(-)

diff --git a/emulators/es-de/Makefile b/emulators/es-de/Makefile
index 4659133b99e3..6c702fed07e4 100644
--- a/emulators/es-de/Makefile
+++ b/emulators/es-de/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	es-de
 DISTVERSIONPREFIX=	v
 DISTVERSION=	3.1.0
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	emulators
 
 MAINTAINER=	bsdcode@disroot.org
@@ -26,28 +26,25 @@ LIB_DEPENDS=	libavcodec.so:multimedia/ffmpeg \
 		libpugixml.so:textproc/pugixml \
 		librlottie.so:graphics/rlottie
 
-USES=		cmake compiler:c++17-lang gl localbase pkgconfig sdl
+USES=		cmake compiler:c++17-lang gl pkgconfig sdl
 USE_GITLAB=	yes
 GL_PROJECT=	emulationstation-de
 USE_GL=		opengl
 USE_SDL=	sdl2
 
+CMAKE_ARGS=	-DUTF8CPP_INCLUDE_DIR=${LOCALBASE}/include/utf8cpp
 CMAKE_ON=	VIDEO_HW_DECODING
 
 OPTIONS_DEFINE=		DEINIT DOCS NLS
 OPTIONS_DEFAULT=	DEINIT
 OPTIONS_SUB=		yes
 
-DEINIT_DESC=		Deinit frontend on emulator launch
+DEINIT_DESC=	Deinit frontend on emulator launch
 
 DEINIT_CMAKE_BOOL=	DEINIT_ON_LAUNCH
 
-NLS_USES=		gettext
-NLS_CMAKE_BOOL=		COMPILE_LOCALIZATIONS
-
-post-patch:
-	${REINPLACE_CMD} 's|#include "utf8.h"|#include <utf8cpp/utf8.h>|g' \
-		${WRKSRC}/es-core/src/utils/StringUtil.h
+NLS_USES=	gettext
+NLS_CMAKE_BOOL=	COMPILE_LOCALIZATIONS
 
 post-install-DOCS-on:
 	${MKDIR} ${STAGEDIR}${DOCSDIR}
diff --git a/emulators/es-de/files/patch-CMakeLists.txt b/emulators/es-de/files/patch-CMakeLists.txt
index df8948e11e5b..5396328f944a 100644
--- a/emulators/es-de/files/patch-CMakeLists.txt
+++ b/emulators/es-de/files/patch-CMakeLists.txt
@@ -4,8 +4,8 @@
      find_package(Libgit2 REQUIRED)
      find_package(Pugixml REQUIRED)
      find_package(SDL2 REQUIRED)
-+    pkg_check_modules(rapidjson REQUIRED RapidJSON)
-+    pkg_check_modules(rlottie REQUIRED rlottie)
++    find_package(RapidJSON REQUIRED)
++    find_package(rlottie REQUIRED)
  endif()
  
  # Add libCEC support.
@@ -33,7 +33,7 @@
          endif()
      endif()
  endif()
-@@ -454,12 +455,7 @@ set(COMMON_INCLUDE_DIRS ${CURL_INCLUDE_DIR}
+@@ -454,12 +455,8 @@ set(COMMON_INCLUDE_DIRS ${CURL_INCLUDE_DIR}
  # Include files.
  
  set(COMMON_INCLUDE_DIRS ${CURL_INCLUDE_DIR}
@@ -43,31 +43,21 @@
 -                        ${CMAKE_CURRENT_SOURCE_DIR}/external/rapidjson/include
 -                        ${CMAKE_CURRENT_SOURCE_DIR}/external/rlottie/inc
 -                        ${CMAKE_CURRENT_SOURCE_DIR}/external/utfcpp/source
++                        ${UTF8CPP_INCLUDE_DIR}
                          ${CMAKE_CURRENT_SOURCE_DIR}/es-core/src
                          ${CMAKE_CURRENT_SOURCE_DIR}/es-pdf-converter/src)
  
-@@ -515,7 +511,9 @@ else()
-                             ${HarfBuzz_INCLUDE_DIRS}
-                             ${ICU_INCLUDE_DIRS}
-                             ${PUGIXML_INCLUDE_DIRS}
--                            ${SDL2_INCLUDE_DIR})
-+                            ${SDL2_INCLUDE_DIR}
-+                            ${rapidjson_INCLUDE_DIRS}
-+                            ${rlottie_INCLUDE_DIRS})
- endif()
- 
- # Add libCEC include directory.
-@@ -647,7 +645,8 @@ else()
+@@ -647,7 +644,8 @@ else()
                           ${HarfBuzz_LIBRARIES}
                           ${ICU_LIBRARIES}
                           ${PUGIXML_LIBRARIES}
 -                         ${SDL2_LIBRARY})
 +                         ${SDL2_LIBRARY}
-+                         ${rlottie_LINK_LIBRARIES})
++                         ${rlottie_LIBRARIES})
      if(Intl_LIBRARY)
          # On Unix systems where the gettext functions are not part of the C standard library
          # we need to explicitly link with the libintl library.
-@@ -662,7 +661,6 @@ if(NOT WIN32)
+@@ -662,7 +660,6 @@ if(NOT WIN32)
          set(COMMON_LIBRARIES ${COMMON_LIBRARIES} ${PROJECT_SOURCE_DIR}/android_${ANDROID_ABI}/librlottie.a)
      else()
          set(COMMON_LIBRARIES ${COMMON_LIBRARIES} ${PROJECT_SOURCE_DIR}/liblunasvg.a)
@@ -75,7 +65,7 @@
      endif()
  endif()
  
-@@ -726,8 +724,3 @@ endif()
+@@ -726,8 +723,3 @@ endif()
  if(COMPILE_LOCALIZATIONS)
      add_dependencies(es-pdf-convert localization)
  endif()



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202411121831.4ACIVhuD056207>