From nobody Mon Jun 27 07:10:28 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0EA298696D2; Mon, 27 Jun 2022 07:10:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LWf504nHqz4VV3; Mon, 27 Jun 2022 07:10:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656313828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rxYKws1PJvOdj6eJLarSizJ6DjqfzrxcOF3YXZapf+I=; b=POjt6MP5p1tqgd7vLNJhMYUq9R2hgz3OlsLTM8EsOnIArk4e1zAroiwG+LK2XsxKBi+hnW MeHXZdYDgDdz639dW/lYzUsLDaiml92Gz5KUK0S6V35KFCEWZCcQ+grOfi9XStv6tXJ6hf /UXMTllfeAfNx0PFIjGVNodqA9AE962pltCXjM7yMFXAbCNMdvpqtZwETf61gvfA+15CEX ddP8uko0/wYh/RP2Ielpvo92JApNAZaclJ9T15p3++ynUa/fFZOX3LuOgOVumeRyBTMpoQ f9Xa6aTG5D6IAKojvESUUmZP+mnxAJJHlgIkkXhLD+dQqN1TMC8gZOvJ9mYxJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6B9AD23ABF; Mon, 27 Jun 2022 07:10:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 25R7ASv2006475; Mon, 27 Jun 2022 07:10:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25R7ASGS006474; Mon, 27 Jun 2022 07:10:28 GMT (envelope-from git) Date: Mon, 27 Jun 2022 07:10:28 GMT Message-Id: <202206270710.25R7ASGS006474@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 84f32169ed73 - main - emulators/libretro-pcsx2: Fix 32-bit / i386 build List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 84f32169ed730eb0244ef01c59aea892ba1d3895 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656313828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rxYKws1PJvOdj6eJLarSizJ6DjqfzrxcOF3YXZapf+I=; b=j3DVB2teMH5IvXGXqSvmO7nyV72OlXPRxrygc6YsIvM2eJrxhn9UmBimbVGUx04SWATJZg yVVE5CGjod1JicLh7GTahMwdmt0fr6ccIhvqjAZKompNqYRY5Dm152c+jgjwFxN8XpG43/ sWuDfpFydhKvRBLbaJQw6PO4NrNQ/xCXWMibKuuirTMc1wCLmy2U7Apvnc4AD3WsP0HAXf IqYHpC5TfL50rkiuAZb682U44BlWaH9rSnYlGurErKhxoviOluBUE/Rk06NP6tuRCFW/tB Be2E0XE0J7NXnexRxMid9uH20snKOEr50VwXc3V+r9dJqgcCfjgTQzOjx4N1QQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1656313828; a=rsa-sha256; cv=none; b=t7bqzDVlX9J1th2kkNVYXhgi6u8Hj2DiNbvhgKfv8/6AEgLdEEGbQWZbT4A90q1n7TVbCx T1T6m3N5T+MGX56JInLtzPVcmCfnvF8sggQAKmlAQGG6Tjzf/gEF6vRprR3sWJohfnYs3s fSTpR1/0WnCojTo1TU0XbyvNlBcKuxMFLfk98yeVZpqPIlD13WEU63tomQZfhMO3lJJoqF 948Q0t6ZmhOAG3YcuVrBgm5h2rD0N9lCcL0GorpeCtarcpzMVx1m2Du3YOmik/0AE/Re4T FhQr9190+9L5oTAdACqNGislp8kYG4/eu8UMZyFA05gepWh0TshEFnQGNtKQ/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/ports/commit/?id=84f32169ed730eb0244ef01c59aea892ba1d3895 commit 84f32169ed730eb0244ef01c59aea892ba1d3895 Author: Timothy Beyer AuthorDate: 2022-06-27 07:09:34 +0000 Commit: Li-Wen Hsu CommitDate: 2022-06-27 07:09:34 +0000 emulators/libretro-pcsx2: Fix 32-bit / i386 build PR: 264219 --- emulators/libretro-pcsx2/Makefile | 55 ++++++++++++++-------- .../patch-3rdparty_wxwidgets3.0_UsewxWidgets.cmake | 9 +++- .../libretro-pcsx2/files/patch-libretro_main.cpp | 30 ++++++++++++ 3 files changed, 73 insertions(+), 21 deletions(-) diff --git a/emulators/libretro-pcsx2/Makefile b/emulators/libretro-pcsx2/Makefile index 779c89f7d839..e0edd23fb64e 100644 --- a/emulators/libretro-pcsx2/Makefile +++ b/emulators/libretro-pcsx2/Makefile @@ -1,7 +1,8 @@ -# $FreeBSD$ +# Created by: Timothy Beyer PORTNAME= libretro-pcsx2 PORTVERSION= 0.20201030 +PORTREVISION= 1 CATEGORIES= emulators games MAINTAINER= beyert@cs.ucr.edu @@ -10,7 +11,7 @@ COMMENT= Standalone port of pcsx2 to libretro LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/COPYING.GPLv3 -ONLY_FOR_ARCHS= >i386 amd64 +ONLY_FOR_ARCHS= amd64 i386 LIB_DEPENDS= libcdio.so:sysutils/libcdio \ libharfbuzz.so:print/harfbuzz \ @@ -18,31 +19,28 @@ LIB_DEPENDS= libcdio.so:sysutils/libcdio \ libportaudio.so:audio/portaudio \ libSoundTouch.so:audio/soundtouch -USES= cmake compiler:c++11-lib +USES= cmake compiler:c++11-lib -CPPFLAGS+= -I${LOCALBASE}/include/wx-3.0 -USE_CXXSTD= c++11 -#LDFLAGS+= -L${LOCALBASE}/lib -I/usr/lib -USE_LDCONFIG= yes +.include + +CPPFLAGS+= -I${LOCALBASE}/include/wx-3.0 +USE_CXXSTD= c++11 +USE_LDCONFIG= yes CMAKE_CPP_FLAGS= ${CPPFLAGS} CMAKE_PREFIX_PATH= ${LOCALBASE}/include/wx-3.0 -CMAKE_C_FLAGS= ${CFLAGS} +CMAKE_C_FLAGS= ${CFLAGS} CMAKE_CXX_FLAGS= ${CFLAGS} -CMAKE_ARGS+= -DLIBRETRO=yes -CMAKE_ARGS+= -Dgtk_INCLUDE_DIR="${LOCALBASE}/include/gtk-3.0" \ - -DwxWidgets_INCLUDE_DIRS="${LOCALBASE}/include/wx-3.0" +CMAKE_ARGS+= -DLIBRETRO=yes +CMAKE_ARGS+= -Dgtk_INCLUDE_DIR="${LOCALBASE}/include/gtk-3.0" \ + -DwxWidgets_INCLUDE_DIRS="${LOCALBASE}/include/wx-3.0" # lib depends on devel/ccache WITH_CCACHE_BUILD= yes HAVE_GTK3= true -#USES= gnome xorg gl sdl dos2unix cmake:insource iconv gettext linux:c7 pkgconfig -#USE_LINUX= libaio -USE_WX= 3.0+ -#USE_XORG= ice x11 xv xext xxf86vm xtst xrandr xi -USE_GL= gl glew glu +USE_WX= 3.0+ +USE_GL= gl glew glu USE_GNOME= glib20 -#USE_SDL= sdl2 MAKE_JOBS_UNSAFE= yes @@ -53,13 +51,30 @@ GH_TAGNAME= 1251fa4 PLIST_FILES= lib/libretro/pcsx2_libretro.so +.if ${ARCH} == i386 +LDFLAGS+= -Wl,-z,notext +.endif + post-patch: - ${CP} files/3rdparty_wxwidgets3.0_src_unix_fswatcher__kqueue.cpp \ + @${CP} files/3rdparty_wxwidgets3.0_src_unix_fswatcher__kqueue.cpp \ ${WRKSRC}/3rdparty/wxwidgets3.0/src/unix/fswatcher_kqueue.cpp +.if ${ARCH} == i386 + @${REINPLACE_CMD} 's|-D_FILE_OFFSET_BITS=64|-D_FILE_OFFSET_BITS=32|' \ + ${WRKSRC}/3rdparty/wxwidgets3.0/UsewxWidgets.cmake +.endif +# filename.cpp first to have 2u + @${REINPLACE_CMD} -e 's|\[0u\]|[0]|' -e 's|\[1u\]|[1]|' \ + -e 's|\[2u\]|[2]|' \ + ${WRKSRC}/3rdparty/wxwidgets3.0/include/wx/filename.h \ + ${WRKSRC}/3rdparty/wxwidgets3.0/src/common/cmdline.cpp \ + ${WRKSRC}/3rdparty/wxwidgets3.0/src/common/fileconf.cpp \ + ${WRKSRC}/3rdparty/wxwidgets3.0/src/common/filefn.cpp \ + ${WRKSRC}/3rdparty/wxwidgets3.0/src/common/filename.cpp \ + ${WRKSRC}/3rdparty/wxwidgets3.0/src/common/variant.cpp do-install: - ${MKDIR} ${STAGEDIR}/${PREFIX}/lib/libretro; + @${MKDIR} ${STAGEDIR}/${PREFIX}/lib/libretro; ${INSTALL_LIB} ${WRKDIR}/.build/pcsx2/pcsx2_libretro.so \ ${STAGEDIR}/${PREFIX}/lib/libretro; -.include +.include diff --git a/emulators/libretro-pcsx2/files/patch-3rdparty_wxwidgets3.0_UsewxWidgets.cmake b/emulators/libretro-pcsx2/files/patch-3rdparty_wxwidgets3.0_UsewxWidgets.cmake index 96b899de88ec..84b8ad354f6d 100644 --- a/emulators/libretro-pcsx2/files/patch-3rdparty_wxwidgets3.0_UsewxWidgets.cmake +++ b/emulators/libretro-pcsx2/files/patch-3rdparty_wxwidgets3.0_UsewxWidgets.cmake @@ -1,6 +1,13 @@ --- 3rdparty/wxwidgets3.0/UsewxWidgets.cmake.orig 2020-10-29 23:31:05 UTC +++ 3rdparty/wxwidgets3.0/UsewxWidgets.cmake -@@ -11,7 +11,7 @@ if(UNIX) +@@ -5,13 +5,13 @@ set(wxWidgets_LIBRARIES wxwidgets) + set(wxWidgets_CXX_FLAGS) + + include_directories(SYSTEM ${wxWidgets_INCLUDE_DIRS}) +-add_definitions(-DwxUSE_GUI=0 -D_FILE_OFFSET_BITS=64) ++add_definitions(-DwxUSE_GUI=0 -D_FILE_OFFSET_BITS=64 -DwxSIZE_T_IS_UINT) + if(UNIX) + add_definitions(-DwxUSE_UNIX -D__UNIX__) if(APPLE) add_definitions(-D__DARWIN__) else() diff --git a/emulators/libretro-pcsx2/files/patch-libretro_main.cpp b/emulators/libretro-pcsx2/files/patch-libretro_main.cpp new file mode 100644 index 000000000000..b6a069f7bec1 --- /dev/null +++ b/emulators/libretro-pcsx2/files/patch-libretro_main.cpp @@ -0,0 +1,30 @@ +--- libretro/main.cpp.orig 2020-10-29 23:31:05 UTC ++++ libretro/main.cpp +@@ -148,6 +148,7 @@ static void RetroLog_DoWriteLn(const wxString& fmt) + RetroLog_DoWrite(fmt + L"\n"); + } + ++/* + static const IConsoleWriter ConsoleWriter_Libretro = + { + RetroLog_DoWrite, +@@ -160,6 +161,7 @@ static const IConsoleWriter ConsoleWriter_Libretro = + + 0, // instance-level indentation (should always be 0) + }; ++*/ + + static std::vector disk_images; + static int image_index = 0; +@@ -244,9 +246,11 @@ void retro_init(void) + if (environ_cb(RETRO_ENVIRONMENT_GET_LOG_INTERFACE, &log)) + { + log_cb = log.log; ++/* + #if 0 + Console_SetActiveHandler(ConsoleWriter_Libretro); + #endif ++*/ + } + + // pcsx2 = new Pcsx2App;