From owner-freebsd-ports@freebsd.org Thu Dec 14 23:09:46 2017 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E14EE93132 for ; Thu, 14 Dec 2017 23:09:46 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from sonic304-26.consmr.mail.bf2.yahoo.com (sonic304-26.consmr.mail.bf2.yahoo.com [74.6.128.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25BAE7DF50 for ; Thu, 14 Dec 2017 23:09:45 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1513292984; bh=o+Jhtr0Jx5YhEX2qWSxtjO2WmyHdFMyfxwLolP3svyo=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=AacQbu7G2wNt/VMLirK9+p4kTVtV8Vb0E3HTwhc+rd/R0G/uCHaGgY7cQ2YywW3COPShp4gRJ1XR55U4awwEx05u7R4Y6mb1WJGa7mCOuZOCCh0Zqwv3NYugg1VPrdvO1NBxr1OtZP6+rAlrqueDqJasJi0tYdejOz22I9Ws+4I/KA1Y7qU9JjLR2mwgSVYjoOmDKXHnugLzdsYZ28Hu0XdPl08anCH1Ejzi/THwPdfiuVD2lOd+p1Mk690+Tw8uzl2W5lajkSxrz+ga1ZIdp36+WWeYUBh/bYf/Qi15KrPaoZ32aB2kA/nvrqwRQKsmFiCi2mJicL7RDeOV+MjKjQ== X-YMail-OSG: SqhM5X0VM1lvtyRuIiw5AtqQm0YMxHW_nQLWoiASjMTPK9pTA03lqtsAsLgr93M v1Mg5GcxvfWl01MjdKBB1vMojupFgTaZ6AgJEBdsVckIRKUnYIab4FmyHJezIwI8.9CEL_x9j28E lCC34pZX7yRWHxWamSEQBQ3_vK15S3j5CT.tn6VlQCiZXgLDiyBa4.Zp.7.CdafKZt0T6.f6zMV. crIZ8i_Xqsm5gZ_xHXsYTgnos.IUHGZ3GyN.LV0dAmajX5PC4DYDCY8Ve.ds.amg1d0MHi4iCOgr G0mmTR9wblSsA9tOeIIqkqsqK1ElKPWWBlmq0Pe2IG1XjMuFZT_nIWfNecDv.Q1oU8v46ONk8x2p qSW2XegGEEBUloJymQYqNnESYLAryupuZuzzqV9dAvwd_Apjr9Oro65VGDoO1KSv6c9ZcMEemkq. yiA8.KaciVoWWlUqSjO0uQKAbetnRWDGFm8siptdCVsdWFfMDC8_n6bCKJ80GQhYwWzr97Le8 Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.bf2.yahoo.com with HTTP; Thu, 14 Dec 2017 23:09:44 +0000 Received: from smtpgate101.mail.bf1.yahoo.com (EHLO [192.168.0.6]) ([72.30.28.45]) by smtp410.mail.bf1.yahoo.com (JAMES SMTP Server ) with ESMTPA ID 6a413c644a5e302430c85721a12825b4; Thu, 14 Dec 2017 22:59:34 +0000 (UTC) Subject: Re: Linux ports tutorial? WPS Office To: portmaster@BSDforge.com Cc: FreeBSD Ports , blubee blubeeme References: <333d5b8d0ae7910702b50aa3bd975907@udns.ultimatedns.net> From: Pedro Giffuni Message-ID: Date: Thu, 14 Dec 2017 17:59:34 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <333d5b8d0ae7910702b50aa3bd975907@udns.ultimatedns.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 23:09:46 -0000 On 12/14/17 17:07, Chris H wrote: > On Thu, 14 Dec 2017 09:15:35 -0500 "Pedro Giffuni" said >> On 12/13/17 22:31, blubee blubeeme wrote: >>> On Thu, Dec 14, 2017 at 11:17 AM, Pedro Giffuni >> > wrote: >>> >>> Hello; >>> On 13/12/2017 21:11, Chris H wrote: >>> On Wed, 13 Dec 2017 19:56:24 -0500 "Pedro Giffuni" >>> said >>> >>> On 12/10/17 14:55, Eugene Grosbein wrote: >>>> 11.12.2017 2:22, Pedro Giffuni пишет: >>>>> Hello guys; >>>>> >>>>> I would like to attempt a port for WPS Office (AKA >>> Kingsoft Office): >>>>> >>>>> http://wps-community.org/ >>>>> >>>>> Are there guidelines for linux ports? I couldn't find >>> much details in the >>>> handbook. >>>>> >>>>> In particular, how do you handle when the pkg-plist is >>> different for i386 >>>> and amd64? >>>>> >>>>> Some ports use pkg-plist.${ARCH}  but I don't know how >>> those work. >>>> Just have "USES=linux", "USE_LINUX_RPM=yes" and make >>> these two files >>>> pkg-plist.i386 and pkg-plist.amd64 >>>> and they are used automatically. Or you could duplicate >>> a magic from >>>> /ports/Mk/Uses/linux.mk in your Makefile: >>>> >>>> PLIST?= ${PKGDIR}/pkg-plist.${LINUX_ARCH:S/x86_64/amd64/} >>>> >>>> For details, read Porter's Handbook: >>>> >>> https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/ >>> >>>> >>> >>> The handbook has no information about "USE_LINUX_RPM=yes". >>> If I set that it appears the ports framework will ignore >>> MASTER_SITES. >>> >>> Should I dig into the MK framework to see how to change >>> the repository or should I use the .tar.xz distribution >>> instead? :(. >>> >>> I'm not sure. 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.mk >>> : >>> >>> 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}. Any port that uses RPM >>> but not the Centos repositories? >>> >>>     Just a thought, and hope it helps! >>> >>> Thanks, I just have to keep digging :(. >>> >>> Pedro. >>> >>> The linux packaging is okay but I'd recommend learning how the >>> porting process and not just wrapping up a linux binary in FreeBSD. >>> >> >> Well ... of course if I had the source code I would not be dealing >> RPMs for the linuxulator. >> >> Software can be free but not include source code.  It can still be >> desirable for FreeBSD. >> >>> The main reason for that is you can port your way into a corner that >>> relies on very Linux specific stuff that there's just no solution >>> for yet nor will there be one unless you port the entire Linux >>> kernel to FreeBSD. >>> >> >> Which is why we have a linuxulator. > OK Pedro, just so I know I understand your intentions correctly; > You need a way to unpack all the .rpm's, and separate them by > $arch -- 32bit -vs- 64bit, so that you can create the correct > pkg-plist(s) > for each of them. Is that correct? > > I'll await your response before a solution for that. > I did that already, thanks. The trick was defining DISTFILES_amd64, DISTFILES_i386 and SRC_DISTFILES. Now the problem is that our RPM support doesn't expect to find files installed in usr/bin and share. At some point I decided it was better to use the .tar.xz distribution but that uses version of glibc and libpng that don't match either of the centos distributions we carry. So I am back to RPMs. Cheers, Pedro.