Date: Thu, 14 Dec 2017 15:11:09 -0800 From: "Chris H" <portmaster@BSDforge.com> To: "Pedro Giffuni" <pfg@FreeBSD.org> Cc: "FreeBSD Ports" <freebsd-ports@freebsd.org>, "blubee blubeeme" <gurenchan@gmail.com> Subject: Re: Linux ports tutorial? WPS Office Message-ID: <79074ba82ad8bd59f24678b21133bfe1@udns.ultimatedns.net> In-Reply-To: <e799f077-aa54-103f-0972-fa67de130b83@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 14 Dec 2017 17:59:34 -0500 "Pedro Giffuni" <pfg@FreeBSD=2Eorg> said > On 12/14/17 17:07, Chris H wrote: > > On Thu, 14 Dec 2017 09:15:35 -0500 "Pedro Giffuni" <pfg@FreeBSD=2Eorg> sa= id > >> On 12/13/17 22:31, blubee blubeeme wrote: > >>> On Thu, Dec 14, 2017 at 11:17 AM, Pedro Giffuni <pfg@freebsd=2Eorg=20 > >>> <mailto:pfg@freebsd=2Eorg>> wrote: > >>> > >>> Hello; > >>> On 13/12/2017 21:11, Chris H wrote: > >>> On Wed, 13 Dec 2017 19:56:24 -0500 "Pedro Giffuni" > >>> <pfg@FreeBSD=2Eorg> said > >>> > >>> On 12/10/17 14:55, Eugene Grosbein wrote: > >>>> 11=2E12=2E2017 2:22, Pedro Giffuni =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > >>>>> Hello guys; > >>>>> > >>>>> I would like to attempt a port for WPS Office (AKA > >>> Kingsoft Office): > >>>>> > >>>>> http://wps-community=2Eorg/ > >>>>> > >>>>> Are there guidelines for linux ports? I couldn't find > >>> much details in the > >>>> handbook=2E > >>>>> > >>>>> In particular, how do you handle when the pkg-plist is > >>> different for i386 > >>>> and amd64? > >>>>> > >>>>> Some ports use pkg-plist=2E${ARCH}=C2=A0 but I don't know how > >>> those work=2E > >>>> Just have "USES=3Dlinux", "USE_LINUX_RPM=3Dyes" and make > >>> these two files > >>>> pkg-plist=2Ei386 and pkg-plist=2Eamd64 > >>>> and they are used automatically=2E Or you could duplicate > >>> a magic from > >>>> /ports/Mk/Uses/linux=2Emk <http://linux=2Emk> in your Makefile: > >>>> > >>>> PLIST?=3D ${PKGDIR}/pkg-plist=2E${LINUX_ARCH:S/x86_64/amd64/} > >>>> > >>>> For details, read Porter's Handbook: > >>>> > >>> https://www=2Efreebsd=2Eorg/doc/en_US=2EISO8859-1/books/porters-handbook/ > >>> <https://www=2Efreebsd=2Eorg/doc/en_US=2EISO8859-1/books/porters-handbook/> > >>>> > >>> > >>> The handbook has no information about "USE_LINUX_RPM=3Dyes"=2E > >>> If I set that it appears the ports framework will ignore > >>> MASTER_SITES=2E > >>> > >>> Should I dig into the MK framework to see how to change > >>> the repository or should I use the =2Etar=2Exz distribution > >>> instead? :(=2E > >>> > >>> I'm not sure=2E But would having a look at the way > >>> emulators/linux_base-c(6|7) > >>> provide some clues? > >>> > >>> > >>> Not really but I think I found something in Mk/Uses/linux=2Emk > >>> <http://linux=2Emk>: > >>> > >>> For the case of USE_LINUX_RPM it is supposed to not do anything > >>> when MASTER_SITES is defined but it is somewhat messy, and somehow > >>> it always uses ${MASTER_SITE_CENTOS_LINUX}=2E Any port that uses RPM > >>> but not the Centos repositories? > >>> > >>> =C2=A0=C2=A0=C2=A0 Just a thought, and hope it helps! > >>> > >>> Thanks, I just have to keep digging :(=2E > >>> > >>> Pedro=2E > >>> > >>> The linux packaging is okay but I'd recommend learning how the=20 > >>> porting process and not just wrapping up a linux binary in FreeBSD=2E > >>> > >> > >> Well =2E=2E=2E of course if I had the source code I would not be dealing=20 > >> RPMs for the linuxulator=2E > >> > >> Software can be free but not include source code=2E=C2=A0 It can still b= e=20 > >> desirable for FreeBSD=2E > >> > >>> The main reason for that is you can port your way into a corner that= =20 > >>> relies on very Linux specific stuff that there's just no solution=20 > >>> for yet nor will there be one unless you port the entire Linux=20 > >>> kernel to FreeBSD=2E > >>> > >> > >> Which is why we have a linuxulator=2E > > OK Pedro, just so I know I understand your intentions correctly; > > You need a way to unpack all the =2Erpm's, and separate them by > > $arch -- 32bit -vs- 64bit, so that you can create the correct=20 > > pkg-plist(s) > > for each of them=2E Is that correct? > > > > I'll await your response before a solution for that=2E > > >=20 > I did that already, thanks=2E > The trick was defining DISTFILES_amd64, DISTFILES_i386 and SRC_DISTFILES=2E >=20 > Now the problem is that our RPM support doesn't expect to find files=20 > installed in usr/bin and share=2E >=20 > At some point I decided it was better to use the =2Etar=2Exz distribution=20 > but that uses version of glibc and libpng that don't match either of the= =20 > centos distributions we carry=2E So I am back to RPMs=2E Can't you just *omit* those, and use those already supplied by FreeBSD? Maybe those in the linux_base ports, via (run|make)depends? just a thought=2E :-) --Chris >=20 > Cheers, >=20 > Pedro=2E
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?79074ba82ad8bd59f24678b21133bfe1>