steve-cs / gnat-builder

Makefile for downloading and building gnat from github source
2 stars 2 forks source link

GTKAda: patching configure. #7

Closed Blady-Com closed 5 years ago

Blady-Com commented 5 years ago

Hello Steve,

With GTKAda, configure need to be patch: [link library] libgtkada.dylib ld: unknown option: -Wl collect2: error: ld returned 1 exit status I open a pull request to Adacore (https://github.com/AdaCore/gtkada/pull/12). The patch is in attached file. gtkada-patch-diff.txt

How to do it conveniently inside your makefile?

Thanks for your help, Pascal.

steve-cs commented 5 years ago

Probably the simplest way to hack in a source patch would be in the gtkada-build target after it copies the gtkada-src directory to the gtkada-build directory and before it calls configure.

gtkada-build: gtkada-src
    mkdir -p $@
    cp -a $</* $@
    #
    # patch gtkada-build/configure here.
    #
    cd $@ && ./configure --prefix=$(prefix)
Blady-Com commented 5 years ago

Yes Steve, I had done it in that way:

gtkada-build: gtkada-src
    mkdir -p $@
    cp -a $</* $@
    cd $@ && patch -p1 < ../gtkada-patch-diff.txt
    cd $@ && ./configure --prefix=$(prefix)

Well, I wondered if you would support darwin natively in your makefile, as for instance:

gtkada-depends-darwin:
    # get gtkada-patch-diff.txt from repo
    gtkada-patch = "patch -p1 < ../gtkada-patch-diff.txt"
<...>
gtkada-build: gtkada-src
    mkdir -p $@
    cp -a $</* $@
    cd $@ && $(gtkada-patch)
    cd $@ && ./configure --prefix=$(prefix)

Or else should I create a darwin branch ? What is your feedback? Thanks, Pascal.

steve-cs commented 5 years ago

Despite Nick Setton saying almost 2 years ago that Adacore would integrate your suggestions, apparently that didn't happen. I think this is either your problem or Adacore's problem. Not at all obvious the benefit of putting me in the middle on this specific issue.