Tuesday, May 21, 2019

Re: new port games/dMagnetic (help me, please)

Hi - "Leonid Bobrov" is wrong about CC/CFLAGS, it is totally acceptable to
set variables in your Makefile and override them with command line flags.

And it is not necessary to add a pkg-readme if the normal documentation is
enough.

--
Sent from a phone, apologies for poor formatting.

On 21 May 2019 21:07:59 dettus <dettus@dettus.net> wrote:

>> Sorry for that language of mine, I meant no offense, but anyway I caused
>> misunderstanding.
>>
>>
>> Thomas, I assume that dMagnetic.ini file is an example configuration, if
>> so, it's better to place it in ${PREFIX}/share/examples/dMagnetic/
>> (I see that I made a mistake by pointing README.txt file there)
>>
>>
>> Also please write a pkg/README file in your port, the ports system will
>> make it install as /usr/local/share/doc/pkg-readmes/dmagnetic and, after
>> people install a package, they'll see a message that readme is
>> installed, no need to install README.txt file.
>>
>>
>> Also I see that your project's Makefile has install target. I still
>> offer help fixing some issues in your Makefile. I can note about
>> CC and CFLAGS. In the source code of dMagentic write something like
>> this:
>> ```
>> CC?= gcc
>> CFLAGS?= -03
>> CFLAGS+= -Wall
>> ```
>> That way you won't need "MAKE_FLAGS =" line, because ports system should
>> set them via env(1). In shell that would look like this:
>> $ env CC=/usr/bin/clang CFLAGS="-02 -pipe" make all
>>
>>
>> If it won't set CC, then your Makefile will just default to gcc,
>> if it won't set CFLAGS, then your Makefile will just default to -03
>>
>>
>> Also about install target you need to know that ports system sets
>> PREFIX as env(1) variable, so I guess you can rename INSTALLPREFIX to
>> just PREFIX:
>> PREFIX?=/usr/local
>>
>>
>> Then in port's Makefile add this line:
>> FAKE_FLAGS = INSTALLMAN=${PREFIX}/man
>>
>>
>> But I am writting this for future versions of your project, so you don't
>> need to patch dMagentic 0.12
>>
>>
>> Also I still recommend you to use any version control system. If you are
>> unsure which one, most people prefer Git. Other popular VCS'es are:
>> Mercurial, SVN, Fossil and CVS. It's a really useful tool every
>> developer needs, I wish I could explain why.
>
>
> Haha.
>
> Dude, apology ACCEPTED. But apology NOT NECESSARY. :) I was
> not offended at all!!!! You put in some effort, looking at my work.
> You gave me feedback, I learned something.
> And you helped me! That is the most important thing.
>
> My goal is to get my project into the ports tree, and your input
> gets me closer. In other words: THANK YOU SO SO MUCH!!!
>
>
>
> I definitely will work in the changes you suggested. They are very
> good. As for the VCS: I am currently hosting the source on github,
> albeit in a private repository. I will make it public soon.
>
> For the ports, I have created a public repo, you can find it at
> http://www.github.com/dettus/ports_and_packages.
>
>
> Thomas

No comments:

Post a Comment