| 33 | | The next step is to import original sources. There are two possible cases: using a tarball from the vendor or taking the sources right from the vendor's source repository (SVN, GIT, HG, etc). There is one essential difference between these cases: the tarball will usually contain pre-generated sources necessary for the build (and sometimes also the documentation) while the repository doesn't contain these files assuming they will be regenerated by the developer. The vendor's repository looks like a more suitable source for importing (because it makes no sense to store generated files in a version control system). But most projects in this '''ports''' repository are Linux-oriented and we don't have all the tools necessary to generate build files (and, especially, documentation), so sometimes it is more desirable to take a tarball for importing (and remove files we can generate on OS/2 later on). |
| | 33 | The next step is to import original sources. There are two possible cases: using a tarball from the vendor or taking the sources right from the vendor's source repository (SVN, GIT, HG, etc). There is one essential difference between these cases: the tarball will usually contain pre-generated sources necessary for the build (and sometimes also the documentation) while the repository doesn't contain these files assuming they will be regenerated by the developer. The vendor's repository is a '''preferred''' source for importing (because it makes no sense to store generated files in a version control system). But sometimes it's not possible, either because the vendor repository is not accessible or because not all files can be re-generated on OS/2 due to the lack of some Linux tools that hasn't been ported to OS/2 yet. |
| | 34 | |
| | 35 | === Importing from a foreign repository |
| | 36 | |
| | 37 | Fortunately, the pixman project a the public repository which is located here: http://cgit.freedesktop.org/pixman/. It's a GIT repository, so you need the `git` package to check it out. You also need to define a version you want to import and a tag corresponding to it. In our case it's version 0.32.8 (the latest stable one at the time of writing) and the respective tag is `pixman-0.32.8`. To check out this tag to `vendor-current`, run the following command: |
| | 38 | {{{ |
| | 39 | git clone --depth=1 http://anongit.freedesktop.org/git/pixman.git -b pixman-0.32.8 pixman/tmp |
| | 40 | rm -rf pixman/tmp/.git |
| | 41 | mv `find pixman/tmp/ -maxdepth 1 -mindepth 1` pixman/vendor-current/ |
| | 42 | rmdir pixman/tmp |
| | 43 | }}} |
| | 44 | |
| | 45 | === Importing from a tarball |
| 54 | | Now, in case if the sources were imported from a tarball, it's time to detect which files can be regenerated and should be removed. If the project you are importing is autotools-based, then the best way to do it is to unpack the tarball into a temporary directory and try to run the following command from there (unless there is a special script like `autogen.sh`, `bootstrap` and similar in which case you should use that script instead). This also assumes you have `autoconf`, `automake` and `libtool` packages installed: |
| | 68 | The next step is to mark the result of the new vendor import with a version tag for further reference, like this (see r1230): |
| | 69 | {{{ |
| | 70 | svn copy http://svn.netlabs.org/repos/ports/pixman/vendor/current http://svn.netlabs.org/repos/ports/pixman/vendor/0.32.8 -m "pixman: Tag version 0.32.8 from vendor." |
| | 71 | }}} |
| | 72 | |
| | 73 | Now it's time to start off the project trunk where OS/2 development will actually take place (r1231): |
| | 74 | {{{ |
| | 75 | svn copy http://svn.netlabs.org/repos/ports/pixman/vendor/0.32.8 http://svn.netlabs.org/repos/ports/pixman/trunk -m "pixman: Start off trunk from version 0.32.8 from vendor." |
| | 76 | }}} |
| | 77 | |
| | 78 | === Removing generated files === |
| | 79 | |
| | 80 | This step is applicable only if the sources were imported from a tarball. In this case it is necessary to detect which files can be re-generated and should be removed. If the project you are importing is autotools-based, then the best way to do it is to unpack the tarball into a temporary directory and try to run the following command from there (unless there is a special script like `autogen.sh`, `bootstrap` and similar in which case you should use that script instead). This also assumes you have `autoconf`, `automake` and `libtool` packages installed: |