Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Mar 2002 09:14:16 -0500
From:      Alan E <alane@geeksrus.net>
To:        Sue Blake <sue@welearn.com.au>
Cc:        FreeBSD ports list <ports@freebsd.org>
Subject:   Re: wannabee porter in the poo
Message-ID:  <200203081414.g28EEHk80378@wwweasel.geeksrus.net>
In-Reply-To: <20020309003638.A84857@welearn.com.au>
References:  <20020309003638.A84857@welearn.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday 08 March 2002 08:36, you wrote:
>
This is off the top of my head, but it should be good to give you a start. 
Also, due to limited time, I'll only address a few points, but it should be 
enough to get you started.

> Two archive types:
> I can't answer the question whether it's plain .tar.gz or not,
> because it's one of each, and that's got me confused for starters.
> There must be something in the porting docco that I'm not grokking.
>

You don't say whether they  both come from the same site or not. If they
don't, it's a bit messier in execution.

You'll need to use several of the control variables here. 

1. You should probably set DIST_SUBDIR to ${PORTNAME}. Since you're d/ling 
multiple files, it's nice to keep them in a subdir of ${DISTDIR}. This means 
that when you reference them later on in the Makefile you'll be referring to 
${DISTDIR}/${DIST_SUBDIR}

2. You'll need to set DISTFILES to the names of the files to download, 
including their extensions.

3. You need to look at how the files unpack - that is, do the tarball and the 
zip file each create their own top-level directory when unpacked? This is so 
you can set WRKSRC if necessary, and it most likely will be.

4. You can set EXTRACT_ONLY to the name of the tarball. Then you can extract 
the zip file manually in the pre-patch step.

> Zip file:
> I see that if USE_ZIP is set, then unzip will be used, but
> doesn't that require the unzip port to be installed? Or is
> USE_ZIP sufficient to imply and act on that dependency?

Yes, and yes.

But, since you want to extract the .tar.gz file automatically, you *also*
need to set EXTRACT_CMD=gzip.

> Converting makefile:
> The makefile that comes with the sources is in DOS text
> format (CR/LF), and the notes warn that it needs to be
> changed over before compiling to avoid errors.
> It produces the most astonishing patch you've ever seen :-)
> How should I really be tackling this one?
>

IMO, in the pre-patch target:

pre-patch:
	${MV} ${WRKSRC}/Makefile ${WRKSRC}/Makefile.dos
	${TR} -d '\r' < ${WRKSRC}/Makefile.dos > ${WRKSRC}/Makefile

The reason I say pre-patch, not post-patch, is that you will likely need to 
apply a patch to the Makefile as well, and wouldn't you rather work on it 
after that conversion is over and done with?

-- 
Alan Eldridge
"Dave's not here, man."

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203081414.g28EEHk80378>