# HG changeset patch # User Volker Grabsch # Date 1286018056 -7200 # Node ID 37aa3912b50121f6d301170dec74183a1225b911 # Parent 225608c7dee601486ce2b851cca9d68fbd4301a6 improved coding style diff -r 225608c7dee6 -r 37aa3912b501 Makefile --- a/Makefile Sat Oct 02 10:49:01 2010 +0200 +++ b/Makefile Sat Oct 02 13:14:16 2010 +0200 @@ -15,10 +15,10 @@ TOP_DIR := $(patsubst %/,%,$(dir $(MAKEFILE))) PATH := $(PREFIX)/bin:$(PATH) SHELL := bash -SED := $(shell gsed --help >/dev/null 2>&1 && echo g)sed -PATCH := $(shell gpatch --help >/dev/null 2>&1 && echo g)patch INSTALL := $(shell ginstall --help >/dev/null 2>&1 && echo g)install LIBTOOLIZE := $(shell glibtoolize --help >/dev/null 2>&1 && echo g)libtoolize +PATCH := $(shell gpatch --help >/dev/null 2>&1 && echo g)patch +SED := $(shell gsed --help >/dev/null 2>&1 && echo g)sed VERSION := $(shell $(SED) -n 's,^.*\([^<]*\).*$$,\1,p' '$(TOP_DIR)/doc/index.html') # unexport any environment variables that might cause trouble diff -r 225608c7dee6 -r 37aa3912b501 doc/index.html --- a/doc/index.html Sat Oct 02 10:49:01 2010 +0200 +++ b/doc/index.html Sat Oct 02 13:14:16 2010 +0200 @@ -429,7 +429,7 @@

Almost all packages are updated to their latest version.

- +

Support for OpenSolaris has been dropped.

@@ -471,177 +471,199 @@ feel free to join the project mailing list.

- -

New Package Submission

+ +

Guidelines for Creating Packages

+
  1. -

    - The package should be a - free - software - library - that is really used by one of your applications. -

    - -

    - BTW, we're always curious about the applications people are - porting. On our project website, there is a - list of projects - which use mingw-cross-env. No matter whether your project is - free or proprietary - as long as it has it's own website, we'd be - happy to link to it. -

    - -

    - Also, feel free to link to us. :-) -

    +

    + The package should be a + free + software + library + that is really used by one of your applications. +

    + +

    + BTW, we're always curious about the applications people are porting. + We maintain is a + list of projects + which use mingw-cross-env. + No matter whether your project is free or proprietary + – as long as it has it's own website, + we'd be happy to link to it. +

    + +

    + Also, feel free to link to us. :-) +

  2. - +
  3. -

    - Grep through the src/*.mk files to find a project that is most - similar to yours. (Really, "grep" is your friend.) -

    - -

    - E.g., when adding a GNU library, you should take a package like - gettext.mk - or - libiconv.mk - as the base of your work. Or, when using - a SourceForge project, you should start with a copy of - xmlwrapp.mk. -

    +

    + Grep through the src/*.mk files + to find a project that is most similar to yours. + (Really, grep is your friend here.) +

    + +

    + For instance, + when adding a GNU library, + you should take a package like + gettext.mk + or + libiconv.mk + as the base of your work. + When using a SourceForge project, + you could start with a copy of + xmlwrapp.mk. + And so on. +

  4. - -
  5. -

    - Adjust the comments, fill in the $(PKG)_* fields. - Be especially careful with the $(PKG)_DEPS section. - The easiest way to get the dependencies right is to start with - a minimal setup i.e. make gcc only. -

    -
  6. - +
  7. -

    - Write your $(PKG)_BUILD. If your library has a - ./configure script, enable/disable all depdency libraries - explicitly via "--enable-*" and - "--disable-*" options. -

    +

    + Adjust the comments, + fill in the $(PKG)_* fields. +

    + +

    + Be especially careful with the $(PKG)_DEPS section. + The easiest way to get the dependencies right + is to start with a minimal setup. + That is, + initialize mingw-corss-env with make gcc only. +

    + +

    + Always list the dependency on gcc explicitly: +

    +
    $(PKG)_DEPS     := gcc ...
  8. - +
  9. -

    - You might also have to provide a patch for it. In that case, have - a look at other patches such as - - sdl-2-fix-dinput.patch. - In particular, each patch file should be named as: -

    - -

    -

    PACKAGE-PATCHNUMBER-DESCRIPTION.patch
    -

    -

    - and should start with: -

    -
    -This file is part of mingw-cross-env.
    +        

    + Write your $(PKG)_BUILD. + If your library has a ./configure script, + enable/disable all depdency libraries explicitly + via "--enable-*" and "--disable-*" options. +

    +
  10. + +
  11. +

    + You might also have to provide a patch for it. + In that case, have a look at other patches such as + sdl-2-fix-dinput.patch. + In particular, each patch file should be named as: +

    +
    PACKAGE-PATCHNUMBER-DESCRIPTION.patch
    +

    + and should start with: +

    +
    This file is part of mingw-cross-env.
     See doc/index.html for further information.
     
     This patch has been taken from:
    -https://...
    -    
    -

    - where the URL points to the bugtracker entry, mailing list entry - or website you took the patch from. -

    - -

    - If you created the patch yourself, please offer it to the - upstream project first, and point to _that_ URL, using the - same wording: "This patch has been taken from:". -

    - -

    - Depending on the feedback you get from the project, you might - want to improve your patch. -

    +https://... +

    + where the URL points to the + bugtracker entry, + mailing list entry or + website + you took the patch from. +

    + +

    + If you created the patch yourself, + please offer it to the upstream project first, + and point to that URL, + using the same wording: + "This patch has been taken from:". +

    + +

    + Depending on the feedback you get from the upstream project, + you might want to improve your patch. +

  12. - +
  13. -

    - If you find some time, please provide a minimal test program for - it. It should be simple, stand alone and should work unmodified - for many (all?) future versions of the library. Test programs - are named as: -

    -
    PACKAGE-test.c
    -    or
    -PACKAGE-test.cpp
    +

    + If you find some time, + please provide a minimal test program for it. + It should be + simple, + stand alone and + should work unmodified for many (all?) future versions of the library. + Test programs are named as: +

    +
    PACKAGE-test.c
    + or +
    PACKAGE-test.cpp
    +

    + depending on whether it is a C or C++ library. + To get a clue, + please have a look at existing test programs such as + sdl-test.c. +

    -

    - depending on whether it is a C or C++ library. To get a clue, - please have a look at existing test programs such as - sdl-test.c. -

    - -

    - At the very end of your *.mk file you should build the test - program in a generic way, using strict compiler flags. The - last few lines of - sdl.mk - will give you a clue. -

    +

    + At the very end of your *.mk file + you should build the test program in a generic way, + using strict compiler flags. + The last few lines of + sdl.mk + will give you a clue. +

  14. - +
  15. -

    - You could also try to provide a $(PKG)_UPDATE - section. However, that requires some experience and - "feeling" for it. So it is perfectly okay if you leave the - $(PKG)_UPDATE section empty. We'll fill that - in for you. It's a funny exercise. -

    +

    + You could also try to provide a $(PKG)_UPDATE section. + However, that requires some experience and "feeling" for it. + So it is perfectly okay if you leave the $(PKG)_UPDATE section empty. + We'll fill that in for you. + It's a funny exercise. +

  16. - +
  17. -

    - Check that you don't have "dirty stuf" in your *.mk files, such - as TAB characters or trailing spaces at lines endings. Have - a look at random *.mk files to get a feeling for the coding - style. -

    - -

    - The same holds for your test program. -

    - -

    - However, patch files should always appear in the same coding - style as the files they are patching. -

    - -

    - Finally, in your $(PKG)_BUILD section, please - check that you use our portability variables: -

    -
    -    sed        -> $(SED)
    -    make       -> $(MAKE)
    -    bash       -> $(SHELL)
    -    patch      -> $(PATCH)
    -    install    -> $(INSTALL)
    -    libtoolize -> $(LIBTOOLIZE)
    +

    + Check that you don't have "dirty stuf" in your *.mk files, + such as TAB characters or trailing spaces at lines endings. + Have a look at random *.mk files + to get a feeling for the coding style. +

    + +

    + The same holds for your test program. +

    + +

    + However, patch files should always appear + in the same coding style as the files they are patching. +

    + +

    + Finally, in your $(PKG)_BUILD section, + please check that you use our portability variables: +

    + + + + + + + +
    bash $(SHELL)
    install $(INSTALL)
    libtoolize$(LIBTOOLIZE)
    make $(MAKE)
    patch $(PATCH)
    sed $(SED)
  18. - +
  19. Check whether everything runs fine. If you have some trouble, - don't hesitate to ask on the - mailing list, + don't hesitate to ask on the + mailing list, providing your *.mk file so far.

  20. @@ -997,7 +1019,7 @@

    - See something missing? Feel free to propose a new package. + See something missing? Feel free to create a new package.