README.md (1939B)
1 # Upgrading a subproject 2 3 Some of the subprojects in this directory are using hand-written Meson 4 build files, which must be kept in sync with the official ones. In 5 order to upgrade a dependency, it is advisable to check for breaking 6 changes in the API and build configuration, adjust the code 7 accordingly, and then follow the instructions below: 8 9 ## Pre-upgrade 10 11 ### 1. Download and extract the latest tarball, e.g. 12 13 ``` 14 subprojects/ 15 ├── libsodium/ 16 └── libsodium-stable/ 17 ``` 18 19 ## Upgrade 20 21 ### libsodium 22 23 #### 1. Copy meson files to extracted tarball 24 25 ``` 26 $ find libsodium/ -name '*meson*' 27 libsodium/src/libsodium/include/sodium/meson.build 28 libsodium/meson.build 29 libsodium/meson_options.txt 30 ``` 31 32 #### 2. Copy `checkprogs` subdirectory 33 34 ``` 35 cp -r libsodium/checkprogs/ libsodium-stable/ 36 ``` 37 38 #### 2. Copy the files into the extracted tarball 39 40 #### 3. Compare `src/libsodium/Makefile.am` and update source files 41 42 Including the architecture specific ones! 43 44 #### 4. Bump major and minor versions in main `meson.build` 45 46 ```meson 47 conf_data = configuration_data() 48 conf_data.set('VERSION', '1.0.20') 49 conf_data.set('SODIUM_LIBRARY_VERSION_MAJOR', 26) 50 conf_data.set('SODIUM_LIBRARY_VERSION_MINOR', 2) 51 conf_data.set('SODIUM_LIBRARY_MINIMAL_DEF', '') 52 subdir('src/libsodium/include/sodium') 53 ``` 54 55 They should match the ones in `src/Interop/Interop.Version.cs`. 56 57 ### curl 58 59 #### 1. Copy meson files to extracted tarball 60 61 ``` 62 $ find curl/ -name '*meson*' 63 libsodium/meson.build 64 ``` 65 66 #### 2. Compare `lib/Makefile.inc` and update source files in `meson.build` 67 68 ## Post-upgrade 69 70 ### 1. Swap the directories, e.g. 71 72 ``` 73 mv libsodium/ libsodium.old/ 74 mv libsodium-stable/ libsodium/ 75 ``` 76 77 ### 2. Test that compilation succeeds (and runs) for all platforms 78 79 ``` 80 # linux 81 meson setup build 82 meson compile -C build 83 84 # android 85 ./cross/package-android.sh all 86 87 # ios 88 ./cross/package-ios.sh 89 ``` 90 91 ### 3. Delete the old version, e.g. 92 93 ``` 94 rm -rf libsodium.old/ 95 ```