Github messages for voidlinux
 help / color / mirror / Atom feed
From: iFoundSilentHouse <iFoundSilentHouse@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [WIP] wine: add aarch64 packaging
Date: Sat, 20 Apr 2024 23:17:08 +0200	[thread overview]
Message-ID: <20240420211708.836A522078@inbox.vuxu.org> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-49943@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1244 bytes --]

There is an updated pull request by iFoundSilentHouse against master on the void-packages repository

https://github.com/iFoundSilentHouse/void-packages wine-9.6
https://github.com/void-linux/void-packages/pull/49943

[WIP] wine: add aarch64 packaging
What was added:
* aarch64 as new arch
* mingw is disabled as build option when target is aarch64 (there's no mingw cross package for aarch64)
* added wayland-devel, lld, clang, llvm17, when compiling cross without mingw. Added wayland-devel as member of makedepends. Not sure whether it's right place.
* wine-tools is disabled with no-mingw (clang) compilation (see below)
* minor tweaks for aarch64 building

- I tested the changes in this PR: **NO**

Needs testing:
- [ ] 1) Native aarch64 testing with -Q build
- [ ] 2) Cross-built x86>aarch64 binaries
- [ ] 3) Cross-built aarch64>x86 binaries

- I built this PR locally for these architectures:
  - aarch64 (cross)
  - aarch64-musl (cross)
Build-install was successful but:
1) post-install phase fail with `file truncated`
2) haven't figured out how to build wine-tools when cross-compiling with clang

@Hoshpak  @fvalasiad 

A patch file from https://github.com/void-linux/void-packages/pull/49943.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wine-9.6-49943.patch --]
[-- Type: text/x-diff, Size: 4564 bytes --]

From 4d135798302a70a506c6a530c2d7db69738a235c Mon Sep 17 00:00:00 2001
From: iFoundSilentHouse <adeptslab@gmail.com>
Date: Sun, 21 Apr 2024 01:45:17 +0600
Subject: [PATCH] wine: add aarch64 packaging

---
 srcpkgs/wine/template | 64 ++++++++++++++++++++++++++++++++++---------
 1 file changed, 51 insertions(+), 13 deletions(-)

diff --git a/srcpkgs/wine/template b/srcpkgs/wine/template
index 0e2b07d222c1e0..8f8f81c86d4a03 100644
--- a/srcpkgs/wine/template
+++ b/srcpkgs/wine/template
@@ -1,7 +1,7 @@
 # Template file for 'wine'
 pkgname=wine
 version=9.6
-revision=1
+revision=2
 _pkgver=${version/r/-r}
 create_wrksrc=yes
 build_wrksrc=wine-${_pkgver}
@@ -18,15 +18,19 @@ checksum="0e0960ed82b6017e882eda3338bad1270a1177b6cf05f03ac1fab155abe82048
 
 # NOTE: wine depends on specific versions of wine-mono and wine-gecko,
 # check for updates to these packages when updating wine
-
 build_options="mingw staging xshm"
-build_options_default="mingw xshm"
+build_options_default="xshm"
+case "$XBPS_TARGET_MACHINE" in
+	aarch64*) ;;
+	*) build_options_default+=" mingw" ;;
+esac
+
 desc_option_mingw="Use the MinGW cross compiler to build WinPE DLLs"
 desc_option_staging="Apply the wine-staging patchset"
 desc_option_xshm="Enable support for the X Shared Memory Extension"
 
 lib32mode=full
-archs="i686* x86_64*"
+archs="i686* x86_64* aarch64*"
 
 patch_args="-Np1 --directory=${build_wrksrc}"
 
@@ -49,7 +53,7 @@ makedepends="gettext-devel ncurses-devel glu-devel libSM-devel
  freetype-devel pulseaudio-devel giflib-devel
  v4l-utils-devel fontconfig-devel gnutls-devel dbus-devel sane-devel
  libpcap-devel cups-devel ocl-icd-devel vulkan-loader gst-plugins-base1-devel
- SDL2-devel"
+ SDL2-devel wayland-devel"
 depends="libXi libXinerama libXcomposite libXcursor libOSMesa
  desktop-file-utils hicolor-icon-theme liberation-fonts-ttf
  gnutls SDL2 wine-common>=${version}_${revision}"
@@ -61,8 +65,19 @@ replaces="libwine>=0"
 # This testsuite might hang indefinitely
 make_check=extended
 
+subpackages="wine-devel wine-common"
+if [ ! "$CROSS_BUILD" ] || [ "$build_option_mingw" ]; then
+	subpackages+="wine-tools"
+fi
+
+case "$XBPS_MACHINE" in
+	aarch64*) no_cross=yes # TODO: testing
+esac
+
+
 if [ "$XBPS_TARGET_WORDSIZE" != 32 ]; then
-	configure_args+=" --enable-win64 --libdir=/usr/lib"
+	_64bit_configure_args=" --enable-win64 --libdir=/usr/lib"
+	configure_args+=$_64bit_configure_args}
 	_wine_suffix="64"
 	_wineserver_suffix=${_wine_suffix}
 else
@@ -70,11 +85,25 @@ else
 	CFLAGS=" -D_LARGE_FILE_SOURCE=1 -D_FILE_OFFSET_BITS=64"
 fi
 
+if [ "$CROSS_BUILD" ] && [ ! "$build_option_mingw" ]; then
+	hostmakedepends+=" ${makedepends} lld17 clang17 llvm17"
+	pre_configure() {
+		# native compilation for wine-tools
+		vsrcextract -C ../wine-tools-for-cross wine-${_pkgver}.tar.xz
+		cd ../wine-tools-for-cross
+		env CC=cc LD=ld CXX=g++ \
+			CFLAGS="" CXXFLAGS="" LDFLAGS="" \
+			./configure $_64bit_configure_args # not set if 32bit
+		make ${makejobs}
+		configure_args+=" --with-wine-tools=../wine-tools-for-cross"
+	}
+fi
+
 if [ "$XBPS_LIBC" = "glibc" ]; then
 	hostmakedepends+=" prelink"
 fi
 
-if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+if [ "$XBPS_TARGET_LIBC" = "musl" ] && [ "$XBPS_TARGET_MACHINE" != aarch64-musl ]; then
 	configure_args+=" --enable-archs=i386,x86_64"
 	makedepends+=" cross-i686-w64-mingw32"
 fi
@@ -113,12 +142,21 @@ post_install() {
 	mv ${DESTDIR}${_wine_libexec}/wineserver ${DESTDIR}${_wine_libexec}/wineserver${_wineserver_suffix}
 	vbin ${FILESDIR}/wine
 	vbin ${FILESDIR}/wineserver
-	for file in msiexec regedit regsvr32 wineboot winecfg winepath winemine winefile \
-		winedbg wineconsole notepad msidb widl winebuild winecpp winedump wineg++ \
-		winegcc winemaker wmc wrc function_grep.pl
-	do
-		mv ${DESTDIR}/usr/libexec/wine/${file} ${DESTDIR}/usr/bin/
-	done
+	if [ "$CROSS_BUILD" ] && [ ! "$build_option_mingw" ]; then
+		# do not install wine-tools for target - they were not compiled
+		for file in msiexec regedit regsvr32 wineboot winecfg winepath winemine winefile \
+			winedbg wineconsole notepad msidb
+		do
+			mv ${DESTDIR}/usr/libexec/wine/${file} ${DESTDIR}/usr/bin/
+		done
+	else
+		for file in msiexec regedit regsvr32 wineboot winecfg winepath winemine winefile \
+			winedbg wineconsole notepad msidb widl winebuild winecpp winedump wineg++ \
+			winegcc winemaker wmc wrc function_grep.pl
+		do
+			mv ${DESTDIR}/usr/libexec/wine/${file} ${DESTDIR}/usr/bin/
+		done
+	fi
 	case $XBPS_TARGET_MACHINE in
 		x86_64*)
 			ln -s ${_wine_libexec}/wine64 ${DESTDIR}/usr/bin/wine64

  parent reply	other threads:[~2024-04-20 21:17 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-20 20:47 [PR PATCH] " iFoundSilentHouse
2024-04-20 20:53 ` [PR REVIEW] " classabbyamp
2024-04-20 20:53 ` classabbyamp
2024-04-20 20:53 ` classabbyamp
2024-04-20 20:53 ` classabbyamp
2024-04-20 20:56 ` [PR PATCH] [Updated] " iFoundSilentHouse
2024-04-20 20:56 ` fvalasiad
2024-04-20 21:04 ` [PR REVIEW] " Calandracas606
2024-04-20 21:04 ` iFoundSilentHouse
2024-04-20 21:06 ` fvalasiad
2024-04-20 21:13 ` [PR PATCH] [Updated] " iFoundSilentHouse
2024-04-20 21:17 ` iFoundSilentHouse [this message]
2024-04-20 21:24 ` iFoundSilentHouse
2024-04-20 21:34 ` [PR REVIEW] " classabbyamp
2024-04-20 21:35 ` classabbyamp
2024-04-20 21:36 ` iFoundSilentHouse
2024-04-20 21:37 ` iFoundSilentHouse
2024-04-20 21:41 ` [PR PATCH] [Updated] " iFoundSilentHouse
2024-04-20 21:42 ` iFoundSilentHouse
2024-04-20 21:44 ` [PR PATCH] [Updated] " iFoundSilentHouse
2024-04-20 21:45 ` iFoundSilentHouse
2024-04-20 21:45 ` fvalasiad
2024-04-20 21:56 ` iFoundSilentHouse
2024-04-20 22:08 ` fvalasiad
2024-04-20 22:16 ` iFoundSilentHouse
2024-04-20 22:34 ` [PR PATCH] [Updated] " iFoundSilentHouse
2024-04-20 22:36 ` [PR REVIEW] " iFoundSilentHouse
2024-04-20 22:38 ` [PR PATCH] [Updated] " iFoundSilentHouse
2024-04-21  0:01 ` fvalasiad
2024-04-21  5:56 ` Hoshpak
2024-04-21  6:29 ` iFoundSilentHouse
2024-04-21  6:37 ` iFoundSilentHouse
2024-04-21  7:34 ` iFoundSilentHouse
2024-04-21 14:14 ` fvalasiad
2024-04-22  8:23 ` [PR PATCH] [Updated] " iFoundSilentHouse
2024-04-22  8:23 ` [PR PATCH] [Closed]: " iFoundSilentHouse
2024-04-22  8:25 ` [PR PATCH] [Updated] " iFoundSilentHouse
2024-04-22 10:34 ` iFoundSilentHouse
2024-04-22 10:37 ` [PR PATCH] [Updated] " iFoundSilentHouse
2024-04-22 10:39 ` iFoundSilentHouse
2024-04-22 10:44 ` [PR PATCH] [Updated] " iFoundSilentHouse
2024-04-22 10:49 ` iFoundSilentHouse
2024-04-22 11:53 ` iFoundSilentHouse
2024-04-22 11:54 ` iFoundSilentHouse
2024-04-22 12:09 ` iFoundSilentHouse
2024-04-22 12:09 ` iFoundSilentHouse
2024-04-22 12:10 ` iFoundSilentHouse
2024-04-22 12:12 ` iFoundSilentHouse
2024-04-22 12:13 ` iFoundSilentHouse
2024-04-22 12:17 ` iFoundSilentHouse
2024-04-22 13:24 ` zlice
2024-04-22 13:27 ` zlice
2024-04-22 16:35 ` Hoshpak
2024-04-22 16:49 ` iFoundSilentHouse
2024-04-22 16:50 ` iFoundSilentHouse
2024-04-22 17:01 ` iFoundSilentHouse
2024-04-22 19:52 ` fvalasiad
2024-04-23  8:04 ` [PR PATCH] [Updated] " iFoundSilentHouse
2024-04-23  8:07 ` iFoundSilentHouse
2024-04-23  8:13 ` iFoundSilentHouse
2024-04-23  9:18 ` iFoundSilentHouse
2024-04-25 17:39 ` iFoundSilentHouse
2024-05-14  3:30 ` zlice

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240420211708.836A522078@inbox.vuxu.org \
    --to=ifoundsilenthouse@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).