From: Jan Rękorajski Date: Mon, 22 Oct 2018 21:50:23 +0000 (+0200) Subject: - fix building on x32 X-Git-Tag: auto/th/xrdp-0.9.8-2 X-Git-Url: http://git.pld-linux.org/?a=commitdiff_plain;h=1c80cffad73a194c17f0334b826f14e6d076604a;hp=19c5895faa71e8da61ebf8e14c715cdf340cb43f;p=packages%2Fxrdp.git - fix building on x32 - rel 2 --- diff --git a/x32.patch b/x32.patch new file mode 100644 index 0000000..540b8d9 --- /dev/null +++ b/x32.patch @@ -0,0 +1,44 @@ +--- xrdp-0.9.8/librfxcodec/m4/nasm.m4~ 2017-03-14 03:31:16.000000000 +0100 ++++ xrdp-0.9.8/librfxcodec/m4/nasm.m4 2018-10-22 23:14:49.068774820 +0200 +@@ -30,6 +30,9 @@ + linux*aout*) + objfmt='a.out' + ;; ++ linux-gnux32) ++ objfmt='ELFX32' ++ ;; + linux*) + case "$host_cpu" in + x86_64) +@@ -95,6 +98,7 @@ + BSD-a.out) NAFLAGS='-faoutb -DAOUT';; + ELF) NAFLAGS='-felf -DELF';; + ELF64) NAFLAGS='-felf64 -DELF -D__x86_64__';; ++ ELFX32) NAFLAGS='-felfx32 -DELF -D__x86_64__';; + RDF) NAFLAGS='-frdf -DRDF';; + Mach-O) NAFLAGS='-fmacho -DMACHO';; + Mach-O64) NAFLAGS='-fmacho64 -DMACHO -D__x86_64__';; +--- xrdp-0.9.8/librfxcodec/src/nasm_lt.sh~ 2017-03-14 03:31:16.000000000 +0100 ++++ xrdp-0.9.8/librfxcodec/src/nasm_lt.sh 2018-10-22 23:15:27.400841584 +0200 +@@ -11,7 +11,7 @@ + pic=yes + fi + ;; +- -f|-fbin|-faout|-faoutb|-fcoff|-felf|-felf64|-fas86| \ ++ -f|-fbin|-faout|-faoutb|-fcoff|-felf|-felf64|-felfx32|-fas86| \ + -fobj|-fwin32|-fwin64|-frdf|-fieee|-fmacho|-fmacho64) + # it's a file format specifier for nasm. + command="$command $1" +--- xrdp-0.9.8/librfxcodec/src/common.asm~ 2017-09-26 08:22:51.000000000 +0200 ++++ xrdp-0.9.8/librfxcodec/src/common.asm 2018-10-22 23:48:37.178222237 +0200 +@@ -34,6 +34,10 @@ + %define is_elf 1 + %endif + ++%ifidn __OUTPUT_FORMAT__,elfx32 ++%define is_elf 1 ++%endif ++ + ; Detect Mach-O formats + %ifidn __OUTPUT_FORMAT__,macho + %define is_macho 1 diff --git a/xrdp.spec b/xrdp.spec index 8406a64..d6df260 100644 --- a/xrdp.spec +++ b/xrdp.spec @@ -1,8 +1,12 @@ +# +# TODO: +# - package systemd stuff +# Summary: Remote desktop server Summary(pl.UTF-8): Serwer remote desktop Name: xrdp Version: 0.9.8 -Release: 1 +Release: 2 License: GPL Group: X11/Applications/Networking Source0: https://github.com/neutrinolabs/xrdp/releases/download/v%{version}/%{name}-%{version}.tar.gz @@ -14,6 +18,7 @@ Source4: %{name}.README.PLD.pl Source5: startwm.sh Patch0: config.patch Patch1: quiet.patch +Patch2: x32.patch URL: http://www.xrdp.org/ BuildRequires: autoconf BuildRequires: automake @@ -89,6 +94,7 @@ Statyczne biblioteki xrdp. %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 install %{SOURCE3} README.PLD install %{SOURCE4} README.PLD.pl @@ -99,8 +105,15 @@ install %{SOURCE4} README.PLD.pl %{__autoconf} %{__autoheader} %{__automake} +cd librfxcodec +%{__libtoolize} +%{__aclocal} -I m4 +%{__autoconf} +%{__autoheader} +%{__automake} +cd .. %configure -%{__make} +%{__make} V=1 %install rm -rf $RPM_BUILD_ROOT