ASSP out of date

Ryan Schmidt ryandesign at macports.org
Wed Nov 5 22:02:46 PST 2008


On Nov 5, 2008, at 23:21, Scott Haneda wrote:

> On Nov 5, 2008, at 7:38 PM, Ryan Schmidt wrote:
>> On Nov 5, 2008, at 21:08, Scott Haneda wrote:
>>> On Nov 5, 2008, at 4:04 PM, David Evans wrote:
>>>> Scott Haneda wrote:
>>>>> This port installs clean, and really nice:
>>>>> http://trac.macports.org/browser/trunk/dports/mail/assp/Portfile
>>>>>
>>>
>>> Original located here: http://pastebin.com/m7a3fb1d6
>>>
>>> sudo port edit assp
>>> Changed -> version                 1.4.3.0
>>> Changed -> maintainers             scott at newgeo.com
>>> Added   -> distname                ASSP_${version}-Install
>>>
>>> pre-patch seems to run around and look for two files, to rename
>>> file rename "${worksrcpath}/ASSP Documentation.htm" $ 
>>> {worksrcpath}/ASSPDocumentation.htm
>>> file rename "${worksrcpath}/Regular Expression Tutorial.htm" $ 
>>> {worksrcpath}/RegularExpressionutorial.htm
>>>
>>> Neither of them exist, and even if they did, they would have  
>>> moved to the docs/ directory.  Either way, I am not sure what was  
>>> bad about spaces in the files anyway, they are html files, and  
>>> most browsers can deal with that.
>>>
>>> I simply removed those two lines.
>>
>> I'm not sure why those lines were there. They were part of the  
>> port since it was initially created in r10407.
>
> Yes, it does seem pretty old.  Surprised there has not been any  
> demand for it.  If I get it nice and simple, I imagine that will  
> change.  While not hard to install, it can be beyond that of some  
> email server admins.  I find it valuable as it let's an email  
> server be an email server, and pulls the burden of spam to a  
> separate area, that can be moved to other machines if needed.
>
>>> Removed -> patchfiles              patch-assp.pl.diff
>>> Here is where my lack of experience comes on, I have no idea if  
>>> the patch is needed, so at this point, I am commenting it out and  
>>> just trying to get it to build. I know it will build clean on a  
>>> Intel machine, so I would imagine, this patch is no longer needed  
>>> with so many versions passing.
>>
>> Not sure either. It's also been there since the initial revision.  
>> You could ask the person who committed that change 3 years ago, or  
>> you could see if the new version of the software already has a  
>> similar change in it, in which case it was probably a bug that the  
>> previous maintainer fixed locally, which is now no longer needed.
>
> I peeked a the patch and the new file in source, and it more or  
> less looks like the changes are there.  Since I know it builds on  
> OS X Leopard at least, I am pretty sure it is fine as is with no  
> patch.
>
>>> * How do I debug and print out the {worksrcpath} so I can see  
>>> what it is, and what is it that sets that path as well?
>>
>> You can "ui_info ${worksrcpath}" or "return -code error $ 
>> {worksrcpath}" for example.
>
> I just put them right in the portfile?

You can put it wherever you want it to be executed. For example, the  
pre-fetch block is a common place to issue error messages, or while  
I'm developing a portfile, to put debugging commands.

pre-fetch {
	return -code error "worksrcpath is ${worksrcpath}"
}

> How does the -d flag start sending out all the debug lines? I do  
> not see any conditionals telling it if -d print this or that.

Not in the portfile you don't, but the MacPorts base code is full of  
debug statements, which only get printed if the -d flag is used. You  
can check out and view the base code too if you want.


>> The first thing you should do is remove these lines:
>>
>> pre-extract		{ file mkdir ${worksrcpath} }
>> extract.dir		${worksrcpath}
>>
>> Previously, the software apparently unpacked directly, without  
>> creating an enclosing directory. Now it does create an enclosing  
>> directory for itself. So you no longer need to do so in the Portfile.
>>
>> Maybe you need so set worksrcdir to "ASSP_${version}-Install/ASSP"
>
> Ok, I will try these suggestions.
>
>>> Looking at configure:
>>> configure {
>>>       reinplace "s%^#!.*perl%#![binaryInPath perl]%" \
>>>               ${worksrcpath}/assp.pl \
>>>               ${worksrcpath}/move2num.pl \
>>>               ${worksrcpath}/rebuildspamdb.pl \
>>>               ${worksrcpath}/repair.pl \
>>>               ${worksrcpath}/stat.pl
>>>       reinplace "s%/usr/local/assp%${assp_base}%" \
>>>               ${worksrcpath}/ASSPDocumentation.htm \
>>>               ${worksrcpath}/stats.sh \
>>>               ${worksrcpath}/assp.pl \
>>>               ${worksrcpath}/rc/assp.dat \
>>>               ${worksrcpath}/rc/start.dat \
>>>               ${worksrcpath}/rc/stop.dat
>>>       reinplace "s%/usr/local%${prefix}%" \
>>>               ${worksrcpath}/ASSPDocumentation.htm
>>> }
>>>
>>> I can see, I am pretty sure I need to delete the 2  
>>> "ASSPDocumentation.htm" lines, is this correct?
>>
>> If you no longer want to do the reinplaces in that file, then sure.
>
> Now that I get what the above configure does, I am not clear where  
> the options are to tell the app how to compile, am I just missing  
> those in the portfile somewhere?

Read the Guide. MacPorts executes many phases, such as fetch,  
extract, patch, configure, build, destroot, install, activate, and  
has default actions that it performs in each of those. These default  
actions are sufficient for many kinds of software. For example, the  
configure phase runs, basically, "./configure --prefix=${prefix}" in  
the worksrcpath, and the build phase runs "make". You can override  
bits of these phases as needed to adapt to the particular software  
you're trying to write a portfile for.




More information about the macports-users mailing list